go to previous page   go to home page   go to next page hear noise highlighting

Answer:

No. Inheritance goes in only one direction.


Is-a Relationship

ford isa automobile

The picture shows a parent class and a child class. The line between them shows the "is-a" relationship. The arrow points to the parent class from the child class. The picture can be read as "a Ford is-a automobile."

The phrase "is-a" is in common use in computer science. The arrow between a child and parent is sometimes called an "is-a link".

The clouds represent classes. The picture does not show objects.

Inheritance is between classes, not between objects.

A parent class is a blueprint that is used when an object is constructed. A child class is another blueprint (that looks much like the parent), but with added features. The child class is used to construct objects that look like the parent's objects, but with added features.


QUESTION 5:

How many objects of a given class can be constructed? (Hint: how many houses can be build from one blueprint?)


go to previous page   go to home page   go to next page