Re: Confusion With Inheritance



Responding to Martin...

Notice that when you described your classes, you described them in
terms of the data that they held, and not in terms of the behavior
that they exhibited. This is the first, and most serious, problem
with your example. Object Oriented Design is a discipline for
partitioning *behavior*, and *incidentally* the data that goes with
that behavior.

We disagree Big Time on this one.

Knowledge and behavior responsibilities have always been given equal stature in OO development. One abstracts the /intrinsic/ properties of problem space /entities/. The proportions of knowledge vs. behavior or their relative importance to the solution is not relevant -- one abstracts and encapsulates the entity's bundle of relevant properties as the object.

Defining objects based primarily around behaviors rather than the whole entity is just a form of procedural functional decomposition. One ends up defining a function library that collects procedures into classes rather than abstracting the problem space. Then when one connects up the class library with messages one has a C or FORTRAN program with strong typing.


************* There is nothing wrong with me that could not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions  -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH



.