State whether each of the following is true or false. If false, explain why.
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.
You might also like to view...
What feature in an Excel PivotTable shows the detailed records of a PivotTable total?
A) Details report B) Detail-down C) Details view D) Drill-down
Another name for the name and job title of the writer is
A) inserted signature text. B) complimentary close. C) writer's signature block. D) inside address.