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

1. Constructors are inherited. After all something has to initialize the inherited variables.
2. When class D is derived from class B, the derived class is usually smaller. Explain.
3. If B is a base class of D, then D’s members cannot access the private data members of B without regard to the kind of inheritance.
4. If B is a base class of D, then D’s members cannot invoke private member functions of B without regard to the kind of inheritance.
5. If B is a public base class of D, then D’s members cannot invoke public members functions of B.


1. False
None of constructors, destructors, operator assignment, and friend functions are inherited. Nevertheless, they are invoked by the constructors and destructor of the derived class.
2. False
Smaller in this situation means has fewer member functions and perhaps fewer member variables. The derived class inherits the members of the base class and adds more of its own.
3. True
With any kind of derivation, public, protected or private, private function and data members of the base class are inaccessible to any function not declare in the base class.
4. True
With any kind of derivation, public, protected or private, private function and data members, of the base class are inaccessible to any function not declare in the base class.
5. False.
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).

Computer Science & Information Technology

You might also like to view...

The default name of a Web site's home page is usually default.html or ________

A) main.html B) web.html C) index.html D) home.html

Computer Science & Information Technology

DHCP is enabled by default in the Cisco IOS. If you want to make sure it is enabled, use the ____ command at the global configuration mode prompt.

A. dhcp on B. enable dhcp C. enable service dhcp D. service dhcp

Computer Science & Information Technology

An example of progressive enhancement is when you specify a fallback color for a background image. _________________________

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

Computer Science & Information Technology

Visual Basic's auto-implemented properties feature enables you to ____.

A. make the property ReadOnly B. add validation code to the set block C. make the property WriteOnly D. specify the property of a class in one line of code

Computer Science & Information Technology