February 2014
Beginner
1248 pages
62h 25m
English
a) Inheritance.
b) public and protected.
c) is-a or inheritance.
d) has-a or composition.
e) hierarchical.
f) public.
g) constructor.
h) super.
a) True.
b) False. A has-a relationship is implemented via composition. An is-a relationship is implemented via inheritance.
c) False. This is an example of a has-a relationship. Class Car has an is-a relationship with class Vehicle.
d) False. This is known as overriding, not overloading—an overloaded method has the same name, but a different signature.
Read now
Unlock full access