Some questions about inheritance

T

Tony Johansson

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
 
V

Victor Bazarov

Tony said:
I have some questions about inheritance that I want to have an answer
to. [...]

Take a habit of asking questions in newsgroups best suited for them.

For example, generic inheritance questions have nothing to do with the
language in which they are implemented. Try comp.object. Read it for
a while, ask a few OOP/OOD questions there. See if it fits your needs.
I bet you'll find a lot of good OO help there.

I am not against answering OOP questions in c.l.c++ _if_ they are
regarding the language. Your questions have really nothing to do with
C++ _per_se_.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top