Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Advice on OO Program structure & organization

by Rudif (Hermit)
on Dec 12, 2004 at 22:02 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found