State whether each of the following is true or false. If false, explain why.
1) Base-class constructors are not inherited by derived classes.
2) A has-a relationship is implemented via inheritance.
3) A Car class has an is-a relationship with the SteeringWheel and Brakes classes.
4) Inheritance encourages the reuse of proven high-quality software.
5) When a derived-class object is destroyed, the destructors are called in the reverse order of the constructors.
1) True.
2) False. A has-a relationship is implemented via composition. An is-a relationship is implemented via inheritance.
3) False. This is an example of a has-a relationship. Class Car has an is-a relationship with class Vehicle.
4) True.
5) True.
You might also like to view...
In a ________ chart, narrow rectangles represent data by their length and are oriented horizontally instead of vertically
A) column B) bar C) line D) trendline
In regular expressions, every character inside a pattern is taken literally, with the exception of metacharacters, which are assigned a special meaning.
Answer the following statement true (T) or false (F)
The generation of logs on devices such as routers, proxies, and firewalls should always be set to the ________ at which your network can operate
Fill in the blank(s) with correct word
Which of the following port is associated with NetBIOS?
a. 21 b. 80 c. 139 d. 443