http://qs1969.pair.com?node_id=414274


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