[Tutor] Communication between classes

Greg Perry gregp at liveammo.com
Sun Apr 1 18:17:00 CEST 2007


Hi again,

I am still in the process of learning OOP concepts and reasons why classes should be used instead of functions etc.

One thing that is not apparent to me is the best way for classes to communicate with each other.  For example, I have created an Args class that sets a variety of internal variables (__filename, __outputdir etc) by parsing the argv array from th command line.  What would be the preferred mechanism for returning or passing along those variables to another class?  Maybe by a function method that returns all of those variables?





More information about the Tutor mailing list