OOPortal
OOPortal
SiteMap
Reusable Software
Structured Programming
Inheritance/Polymorphism
«Prev
Reusable Code
Polymorphism Concept
Comparing Conversion Operators
ADT Conversion
Conversion Member Functions
Signature Matching Algorithm
Operator Overloading
Unary Binary Overloading
friend Function Usage
friend Function - Quiz
Overloading Operators
Pure Polymorphism
public Inheritance - Quiz
Virtual Function - Exercise
Pure Polymorphism
Ecological Simulation
Derived Classes and Public Inheritance - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
The inheritance mechanism provides a means of deriving:
A.
a new class from an existing class
B.
a new operator from an existing operator
C.
a new set of memory allocation functions from the built-in ones
D.
all of these
2.
The ___________ member function is declared in the base class but redefined in the derived class.
A.
class
B.
overloaded
C.
virtual
D.
operator
3.
Public inheritance hierarchies allow:
A.
code reuse
B.
subtyping
C.
virtual function overriding
D.
all of these
4.
Which is not a C++ access keyword?
A.
public
B.
private
C.
privileged
D.
protected
5.
In public inheritance:
A.
all members of the base class are inherited and are made public
B.
members of the base class that are not private are inherited and retain their access types
C.
all members of the base class are inherited and retain their access types
D.
only public members of the base class are inherited and they remain public
Score =
Correct answers:
Quiz Explanation