Answer the following questions true (T) or false (F)

1. If B is a public base class of D, then D’s members cannot invoke public members functions of B.

2. An inheritance chain of any desired length is possible.


1. False
Explanation: With public inheritance, public members of the base class are public members of the derived class, protected members become protected members of the derived class but private members are private to the base class. The private members are inaccessible to any function except those declared in the base class (this includes friends).
2. True
Explanation: There is no reason to limit the length of an inheritance chain. There are software complexity arguments against very long inheritance chains that are beyond the scope of this text.

Computer Science & Information Technology

You might also like to view...

shape can be given an A absolute position in a Canvas using the Canvas’s methods ________ and________.

a) SetX, SetY b) SetLeft, SetTop c) PositionX, PositionY d) PadLeft, PadTop

Computer Science & Information Technology

A(n) ____ is a file that travels along with an e-mail message.

A. attachment B. letter C. announcement D. message

Computer Science & Information Technology

Repeat Exercise 4.5, but use the AIRLINE schema of Figure 3.8.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is not an acceptable variable name?

a. my Friend b. your_Friend c. We_Are_All_Friends d. all of the above are acceptable variable names

Computer Science & Information Technology