Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Advice on OO Program structure & organization

by Rudif (Hermit)
on Dec 12, 2004 at 22:02 UTC ( #414274=note: print w/replies, xml ) Need Help??


in reply to Advice on OO Program structure & organization


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
  • Comment on Re: Advice on OO Program structure & organization

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://414274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2023-02-01 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?