More power than needed ... OOP to Don Clugston
BLS
lietz at wanadoo.fr
Fri Mar 17 05:31:32 PST 2006
Hi Don,
Don C. wrote :
<<In OOP, you spend your time trying to find Is-A relationships, but they
don't exist. Unsurprisingly, hardly anyone is "really" doing OOP. It
seems to be unimplementable.>>
Oops, what is the matter? . A Is-relation between two classes is just
inheritance. f.i. cB inherits cA, ergo cB is a special case of cA.
I think you talk about the problem to decide : Do we have a
Has-Relationship or do we have a Uses-Relationship. ?!
I agree, it is often difficult to figure out the difference between Has- and
Uses- Relationship.
But when you keep in mind that a Has-Relationship only exist when we can
say instead of :
cA has 2(n) cB objects ,
cA consists of 2 cB objects.
-------------------------
In other words : cA consists of 2(n) cB objects means Has-Relationship.
Bjoern
More information about the Digitalmars-d
mailing list