What mistake prevents the following class declaration from functioning properly as an abstract class?
Class Shape
{
Public:
Virtual double print) const;
Double area) const { return base * height; }
Private:
Double base;
Double height;
};
A) There are no pure virtual functions.
B) There is a non-virtual function.
C) private variables are being accessed by a public function.
D) Nothing, it functions fine as an abstract class.
Correct Answer:
Verified
Q1: An abstract class will:
A) Have all zeros
Q4: Which of the following would not be
Q5: Virtual functions must:
A) Be overridden in every
Q6: Abstract classes:
A) Contain at most one pure
Q11: Employee is a base class and HourlyWorker
Q15: Problems using switch logic to deal with
Q17: Which of the following is not allowed?
A)
Q20: If objects of all the classes derived
Q25: Abstract classes do not necessarily have:
A) A
Q27: Concrete classes that inherit virtual functions but
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents