Exam 11: Inheritance and Composition

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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++? Consider the following class definitions:Which of the following dClass constructor definitions is valid in C++?

(Multiple Choice)
4.8/5
(37)

Inheritance is an example of a(n) ____ relationship.

(Multiple Choice)
4.7/5
(44)

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)

OOP implements ____.

(Multiple Choice)
4.7/5
(37)

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: Consider the following class definition:   The class dClass is derived from the class bClass using the ____ type of inheritance. 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)

The ____ members of an object form its internal state.

(Multiple Choice)
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)

Which of the following is true about a derived class?

(Multiple Choice)
4.9/5
(39)
Showing 21 - 40 of 41
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)