Some questions about inheritance



Hello Experts!

I have some questions about inheritance that I want to have an answer to.

It says "Abstract superclasses define a behavioral pattern without
specifying the implementation"
I know that an abstract class doesn't have any implementaion even if a
default implementatiion can be supplied for pure virtual methods.
What does it actually mean with saying that an Abstract superclasses define
a behavioral pattern?

What does it mean with saying that subclasses should respect the semantics
of the superclass?

Code inheritance
This form of inheritance could be called "convenience inheritance". The
subclass "is not a" superclass,
but can use some of its implementation. The functions of the superclass need
not be valid for the subclass, and if they are they may have different
semantics.
Here what does it mean with saying . . .and if they are they may have
different semantics?

Is delegation the same as aggregation and composition?

Many thanks

//Tony



.



Relevant Pages

  • Re: delegation vs. inheritance
    ... I intended not to describe implementation inheritance but specification ... interactions involving superclass instances were modeled. ... responsibility is defined in one and only one place: ... the superclass responsibility correctly for the client context. ...
    (comp.object)
  • Re: Some questions about inheritance
    ... It says "Abstract superclasses define a behavioral pattern without ... The abstract class define the API, ... You could, for example, imagine two subclasses of an abstract List class, one subclass implementing the list with a vector, another one implementing it with a linked list. ... The subclass "is not a" superclass, but can use some of its implementation. ...
    (comp.object)
  • Re: Reference overloading helps inheritance
    ... > AS> Inheritance in Perl OO has its difficulties when it comes to data ... > AS> implementation of the superclass. ... Perl should know about. ... establishing the HAS-A relation in the first place), ...
    (comp.lang.perl.misc)
  • Re: to subclass or separate
    ... and let them both be subclasses from a common superclass. ... > That certainly is another way to setup inheritance. ... a common concept, actually of some "MessageType", but still differ in ... significant implementation details, so one not can say that a "Reply" is-a ...
    (comp.lang.java.programmer)
  • Re: Reference overloading helps inheritance
    ... AS> Inheritance in Perl OO has its difficulties when it comes to data ... AS> implementation of the superclass. ... AS> Time::Piece does, this means I can compare tapes with each other, or ... Search or Offer Perl Jobs ...
    (comp.lang.perl.misc)