Exam 11: Object-Oriented Programming: Inheritance

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

When an object of a derived class is instantiated, the __________ constructor initializes the _________ members.

Free
(Multiple Choice)
4.8/5
(32)
Correct Answer:
Verified

A

Protected base class members cannot be accessed by:

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

A

Assuming the definition, class BasePlusCommissionEmployee : public CommissionEmployee Which of the following is false?

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

C

Which of the following is not one of the disadvantages of using the "copy-and-paste" approach to duplicating code from one class into another class?

(Multiple Choice)
4.7/5
(27)

Which of the following is most likely a base class of the other three?

(Multiple Choice)
4.8/5
(36)

Which of the following is not a kind of inheritance in C++?

(Multiple Choice)
4.9/5
(29)

When deriving a class from a protected base class, the public members of the base class become _________ and the protected members of the base class become __________?

(Multiple Choice)
4.8/5
(38)

Which of the following statements about inheriting base class constructors is false?

(Multiple Choice)
5.0/5
(36)

Select the false statement regarding inheritance.

(Multiple Choice)
4.9/5
(37)

When should base class members be declared protected?

(Multiple Choice)
4.8/5
(38)

The is-a relationship represents.

(Multiple Choice)
4.9/5
(36)

Which forms of inheritance are is-a relationships?

(Multiple Choice)
4.7/5
(39)

Base class constructors and assignment operators:

(Multiple Choice)
4.8/5
(35)

To declare class subClass a privately derived class of superClass one would write:

(Multiple Choice)
4.7/5
(37)

From most restrictive to least restrictive, the access modifiers are:

(Multiple Choice)
4.9/5
(38)

Which of the following is not a good example of a hierarchy likely to be modeled by inheritance?

(Multiple Choice)
4.8/5
(39)

Assuming the following is the beginning of the constructor definition for class BasePlus-CommissionEmployee which inherits from class Point: BasePlusCommissionEmployee::BasePlusCommissionEmployee(string first, String last, string ssn, double sales, double rate, double salary) : CommissionEmployee(first, last, ssn, sales, rate) The line beginning with a colon(:)

(Multiple Choice)
4.7/5
(27)
close modal

Filters

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