Exam 14: Inheritance

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

If class D is derived from class B,we speak of D as the derived class and B as the base class.

(True/False)
4.9/5
(37)

The class D inherits from base class B using public inheritance.The class B has public member function f(),but the derived class has no function member with this signature.The f()is not available to an object of class D.

(True/False)
4.7/5
(44)

Deriving a class from a base class requires serious changes to the base class.

(True/False)
4.8/5
(37)

If class D is derived from class B,we speak of D as the child class and B as the parent class.

(True/False)
4.8/5
(38)

Suppose class Child is derived from class Parent that was in turn derived from class GrandParent.This question concerns order of calls to constructors and destructors for these three classes.Declare an object of class Child.We know that Child,Parent and GrandParent constructors are called.In what order are these constructors are called? When the time comes to destroy the class Child object,we know that Child,Parent and GrandParent destructors are called.In what order are these destructor called?

(Essay)
4.7/5
(42)

You never put a declaration of an inherited member in the derived class.

(True/False)
4.7/5
(34)

Which of the following is correct syntax to declare C++ class B to be a public base class for derived class D

(Multiple Choice)
4.7/5
(33)

An object of a derived class type has exactly one type,the type with which it was declared.

(True/False)
4.9/5
(36)

If class D is derived from class B,then we say that class D inherits from class B.

(True/False)
4.9/5
(34)

A programmer must have the source code for libraries to extend them,even using inheritance.

(True/False)
4.8/5
(35)
Showing 21 - 30 of 30
close modal

Filters

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