You are on page 1of 7

INHERITANCE

And further classes

Monday, 26 September 11

3.1 INTRODUCTION
Allows

is to specify that a class gets some of its characteristics from a parent class and then adds unique features of its own. for richer, more powerful programming. us to write less code.

Allows Allows

Monday, 26 September 11

INHERITANCE OF VEHICLES
Monday, 26 September 11

Monday, 26 September 11

3.4 ABSTRACT CLASSES

Act

as a base for our class hierarchy. cannot be created from abstract classes. of animals.

Objects Example

Monday, 26 September 11

MULTIPLE INHERITANCE

Monday, 26 September 11

GUIDELINES
do

not think that you always have to use inheritance

remember

that there are alternatives such as association and aggregation class should be a kind of its superclass class should be an extension of its superclass

a a

Monday, 26 September 11

You might also like