On Sun, 5 Aug 2012 11:04:36 -0700 (PDT), Jean Dubois
<> declaimed the following in
gmane.comp.python.general:
> Unfortunately, the trouble with this explanation is exactly what made
> me ask the original question: it starts from concepts in c++ making it
> very hard to understand for someone who does not know that language
> already.
Then maybe you are asking the wrong question...
Don't look for Object-Oriented Programming -- since the first widely
popular OOP language was C++ (Smalltalk was earlier, but rather
specialized, whereas C++ started as a preprocessor for C).
Rather look for Object-Oriented Analysis and Design (OOAD). An OOAD
textbook /should/ be language neutral and, these days, likely using the
constructs/notation of UML [which derived from a merger of two or three
separate proposals for OOAD tools]
An OOAD text should cover, besides Classes, Use Cases, state
diagrams, and lots of other things...
The short view of a Class is that it is a means of encapsulating the
methods (functions/operations) of an object along with the attributes
(data) of a specific instance of the class.
A Radio Class would define methods to change the volume, power
state, tuning, and band. These methods are common to all radios. But an
instance of a radio doesn't share its volume level with all other
instances of the Radio class.
OOP is more a style/philosophy of programming by using "objects".
Ada 95 is an OOP language but didn't have the
"object.method(parameters)" syntax (one had to use "method(object,
parameters", but the language could determine which of similar named
methods was meant based upon the type of "object" and the types of the
parameters).
--
Wulfraed Dennis Lee Bieber AF6VN
HTTP://wlfraed.home.netcom.com/