Re: OOP Clarification
Re: OOP Clarification
- Subject: Re: OOP Clarification
- From: Thomas Jahnsen <email@hidden>
- Date: Wed, 02 Jan 2002 16:13:29 +1000
Hi
It is purely a design issue really. In my app I have an application
class and classes that take care of specific parts of the OS Services
(this is a Carbon app in C++ but it doesn't really matter), eg a class
called NavSystem for Navigation Services, AESystem, MenuSystem etc. Most
of these have no variables, only methods. Nevertheless I keep them as
instance methods, and the application object has an instance of each of
them. My OO design has an office approach, where you have a boss (app
object) with several employees with different responsibilities.
So even if there is only methods and no variables, you can still keep
them in an instance object if you wish.
-Thomas Jahnsen
Bob Savage wrote:
To Adam and John, thanks for the responses.
It sounds like the consensus is class method.
if a method does all of it's processing
based purely on arguments passed to it and requires no access to
instance variables or other instance methods, then I'd have thought the
method should be made a class method.