Exam 4: Inheritance and Class Hierarchies

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

If the execution of any constructor in a derived class does not invoke a base class constructor, C++ automatically invokes the no-parameter constructor for the __________ class.

(Multiple Choice)
4.8/5
(37)

In general, it is better to use __________ visibility, because derived classes may be written by different programmers, and it is always a good practice to restrict and control access to the base-class data fields.

(Multiple Choice)
4.8/5
(41)

A Ford Model-T automobile is in a "has-a" relationship with __________.

(Multiple Choice)
4.8/5
(44)

If a member function is declared __________, then when it is called through a pointer (or reference) variable the actual member function will be determined at run time and based on the type of the object pointed to (or referenced).

(Multiple Choice)
4.9/5
(36)

Suppose two Clock class functions named get_military_time use the following headers: Std::string get_military_time (int hours, int minutes); Std::string get_military_time (int hours, int minutes, int seconds); The get_military__time member function is said to be __________.

(Multiple Choice)
4.7/5
(42)
Showing 21 - 25 of 25
close modal

Filters

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