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

1) All virtual functions in an abstract base class must be declared as pure virtual functions
2) Referring to a derived-class object with a base-class handle is dangerous.
3) A class is made abstract by declaring that class virtual.
4) If a base class declares a pure virtual function, a derived class must implement that
function to become a concrete class.
5) Polymorphic programming can eliminate the need for switch logic.

1.False. An abstract base class can include virtual functions with implementations.
2.False. Referring to a base-class object with a derived-class handle is dangerous.
3.False. Classes are never declared virtual. Rather, a class is made abstract by including at least one pure virtual function in the class.
4.True.
5.True.

Computer Science & Information Technology

You might also like to view...

In a pie chart which of the following is a good reason for using category data labels rather than the legend?

A) They take up less space. B) They reveal more information. C) They are easier to format. D) They are easier to read.

Computer Science & Information Technology

How many Elastic IP by default in Amazon Account?

A. 1 Elastic IP B. 3 Elastic IP C. 5 Elastic IP D. 0 Elastic IP

Computer Science & Information Technology