CPlusOOP
SiteMap
Reusable Software
Structured Programming
Inheritance/Polymorphism
«Prev
Reusable Code
Polymorphism Concept
Define Polymorphism Concept
Difference Conversion Overloading
ADT Conversion
Conversion Member Functions
Comparing Conversion Operators
Compiler Selects Overloaded Function
Signature Matching Algorithm
Selection Algorithm Function Overloading
Overloaded Function Example
Using Polymorphism Conclusion
Operator Overloading
Overload Operators
Overloadable Operator Types
Declare Friend Function
friend Function Usage
Operator Keyword
Unary Binary Operator Overloading
Overloading Unary Operators
Overloading Binary Operators
Overloading Assignment Operator
Input Output Operators
Overloading Output Operator
Overloading Input Operator
Overloading Pointer Operator
Overloading New Delete
Operator Overloading Guidelines
Overloading Operators Summary
friend Function - Quiz
Pure Polymorphism
Define Class Inheritance
Pure Polymorphism
Derived Class
Public Inheritance
public Inheritance - Quiz
Constructors Base
Reference Typing Conversions
print member-function
Virtual Functions
Guidelines Virtual Functions
Virtual Function - Selection
Virtual Function - Exercise
Abstract Classes
Reinterpret const cast
Dynamic cast Operator
RTTI
typeid Operator
throw C++ Exception
Pure Polymorphism Conclusion
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
Correct answers:
Your Score: 0
Submit
Quiz Explanation