Exam 11: Inheritance and Composition
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
C++ provides ____________________ functions as a means to implement polymorphism in an inheritance hierarchy.
Free
(Short Answer)
4.8/5
(35)
Correct Answer:
virtual
Objects are created when ____________________ variables are declared.
Free
(Short Answer)
4.7/5
(43)
Correct Answer:
class
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.7/5
(36)
In ____________________ polymorphism, the (data) type is left unspecified and then later instantiated.
(Short Answer)
4.8/5
(31)
The private members of a base class can be directly accessed by a derived class.
(True/False)
4.8/5
(46)
The new classes that we create from existing classes are called ____ classes.
(Multiple Choice)
4.8/5
(42)
Which of the following is a valid definition of the derived class bClass?
(Multiple Choice)
4.9/5
(47)
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.7/5
(37)
The OOP terminology is influenced by the vocabulary of ____________________, the OOP language largely developed at a Xerox research center during the 1970s.
(Short Answer)
4.9/5
(42)
Which of the following class definitions makes the public members of the class aClass become the public members of the class bClass?
(Multiple Choice)
4.7/5
(26)
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.9/5
(36)
The class io is the base class of the C++ stream classes istream and ostream.
(True/False)
4.8/5
(38)
In OOD, a program is a collection of interacting ____________________; in structured programming, a program is a collection of interacting functions.
(Short Answer)
4.7/5
(34)
The preprocessor directive ____________________ is used to prevent multiple inclusions of a header file in a program.
(Short Answer)
4.8/5
(28)
A call to the base class's constructor is specified in the heading of the definition of a derived class constructor.
(True/False)
4.8/5
(42)
If inheritance is public, all protected members of the base class are ____________________ members of the derived class.
(Short Answer)
4.9/5
(37)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)