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
(101)

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.9/5
(86)

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

(Multiple Choice)
4.7/5
(74)

C++ provides ____________________ functions as a means to implement polymorphism in an inheritance hierarchy.

(Short Answer)
4.9/5
(82)

The constructor of a derived class cannot directly access the ____________________ member variables of the base class.

(Short Answer)
4.8/5
(98)

OOP implements ____.

(Multiple Choice)
4.7/5
(88)

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
(89)

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
(100)

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
(77)

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
(59)

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
(85)

The private members of a base class can be directly accessed by a derived class.

(True/False)
4.8/5
(83)

In multiple inheritance, the derived class has more than one base class.

(True/False)
4.9/5
(75)

The ____ members of an object form its internal state.

(Multiple Choice)
4.9/5
(79)

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
(64)

A derived class can directly access the protected members of the base class.

(True/False)
4.9/5
(70)

In ____________________ (aggregation), one or more members of a class are objects of another class type.

(Short Answer)
4.8/5
(76)

If inheritance is public, all protected members of the base class are ____________________ members of the derived class.

(Short Answer)
4.9/5
(86)

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
(80)

Which of the following is true about a derived class?

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

Filters

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