Which among the following is correct?

thanhthao

New member
Which among the following is correct?
A. Abstract functions should not be defined in all the derived classes
B. Abstract functions should be defined only in one derived class
C. Abstract functions must be defined in base class
D. Abstract functions must be defined in all the derived classes
 
Answer: d
Explanation: The abstract function are only declared in base classes and then has to be defined in all the derived classes. This allows all the derived classes to define own definition of any function whose declaration in base class might be common to all the other derived classes.
 

Tìm kiếm

Back
Top