![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: Advice on OO Program structure & organizationby Rudif (Hermit) |
on Dec 12, 2004 at 22:02 UTC ( #414274=note: print w/replies, xml ) | Need Help?? |
It looks like you are creating a database of info about cars - of car models? or of car instances? Either way, I think that you need at least two classes - a CarDatabase and Car. Info on individual cars should be stored in instances of class Car. Class CarDatabase should have a collection (array or hash) of Car instances, and methods for loading info from datafiles and storing it back to datafiles, a.k.a. serialization, and methods for searching, filtering, listing, e.t.c. Rudif
In Section
Seekers of Perl Wisdom
|
|