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

1. A programmer must have the source code for libraries to extend them, even using inheritance.
2. The programmer only needs the interface, including the type definition to create derived classes to extend an existing library.
3. If class D is derived from class B, we speak of D as the derived class and B as the base class.
4. If class D is derived from class B, then we say that class D inherits from class B.
5. If class D is derived from class B then class D has only some of the members from B, and the additional members defined in D.


1. False
The programmer only needs the interface, including the type definition to create derived classes to extend an existing library.
2. True
Other words, such as B inherits from D, D is a derived class of B, or B is a base class for D, are used for this relationship. The terms subclass for derived class and superclass for base class are used in this connection but this is not standard in C++. Nevertheless, those familiar with other OOP languages use these terms inC++, so we mention this here.
3. True
Other words, such as B inherits from D, or class D inherits from base class B, are used for this relationship. The terms subclass for derived class and superclass for base class are used in this connection but this is not standard in C++. Nevertheless, many who are familiar with other OOP languages use these terms in C++, so we mention this here.
4. True
Other words, such as D is a child class of B, B is a parent class for D, D is a derived class of B, or B is a base class for D, are used for this relationship. The terms subclass for derived class and superclass for base class are used in this connection but this is not standard in C++. Nevertheless, those familiar with other OOP languages use these terms in C++, so we mention this here.
5. False
If class D is derived from class B, D automatically receives all of the members of B, and the members defined in D. (The private members of B are also inherited, though it is important to note that those are inaccessible to functions defined in D.)

Computer Science & Information Technology

You might also like to view...

In order to execute code before a form is displayed, place the code in the form’s __________ event handler.

a. SetUp b. Load c. Focus d. Initialize

Computer Science & Information Technology

In terms of copyright, Fair Use is determined to be

a. The use of a copyrighted work for purposes such as criticism, reporting, teaching, scholarship, or research. b. The use of anything you find on the web c. Copying other’s music and fairly distributing it to your friends d. None of the above

Computer Science & Information Technology

Which of the following is NOT part of the Media Controls bar?

A) Move Back 0.25 Seconds B) Edit Video C) Mute/Unmute D) Play/Pause

Computer Science & Information Technology

A lambda expression is

A) an expression whose value can only be assigned to a local variable. B) used by the C++ compiler to check the types of other expressions. C) a class derived from a function object. D) an object of a class whose only member is the function call operator. E) None of the above

Computer Science & Information Technology