Exam 11: Inheritance and Composition
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures Ii Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
Which of the following is a valid definition of the derived class bClass?
(Multiple Choice)
4.7/5
(50)
Consider the following class definitions:Which of the following dClass constructor definitions is valid in C++?

(Multiple Choice)
4.8/5
(37)
C++ provides ____________________ functions as a means to implement polymorphism in an inheritance hierarchy.
(Short Answer)
4.9/5
(34)
The constructor of a derived class cannot directly access the ____________________ member variables of the base class.
(Short Answer)
4.8/5
(45)
If the derived class does not override a public member function of the base class, you may specify a call to that public member function by using the name of the function and the appropriate parameter list.
(True/False)
4.7/5
(43)
Consider the following class definition:
The class dClass is derived from the class bClass using the ____ type of inheritance.

(Multiple Choice)
4.8/5
(47)
To ____ a public member function of a base class in the derived class, the corresponding function in the derived class must have the same name, number, and types of parameters.
(Multiple Choice)
4.8/5
(41)
A call to the base class's constructor is specified in the heading of the definition of a derived class constructor.
(True/False)
4.9/5
(21)
If the corresponding functions in the base class and the derived class have the same name but different sets of parameters, then this function is ____ in the derived class.
(Multiple Choice)
4.8/5
(36)
The private members of a base class can be directly accessed by a derived class.
(True/False)
4.8/5
(42)
In multiple inheritance, the derived class has more than one base class.
(True/False)
4.9/5
(41)
If inheritance is private, all members of the base class, including private members, become private members of the derived class.
(True/False)
4.8/5
(28)
A derived class can directly access the protected members of the base class.
(True/False)
4.8/5
(31)
In ____________________ (aggregation), one or more members of a class are objects of another class type.
(Short Answer)
4.8/5
(33)
If inheritance is public, all protected members of the base class are ____________________ members of the derived class.
(Short Answer)
4.9/5
(35)
The constructors of a derived class can (directly) initialize only the (public data) members inherited from the base class of the derived class.
(True/False)
4.8/5
(32)
Showing 21 - 40 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)