Question: Given a base class, class A, containing data and functions, and derived classes, class B and class C, suppose we wish to include a function

Given a base class, class A, containing data and functions, and derived classes, class B and class C, suppose we wish to include a function in the base class, class A, called double fun(). It is of no use in the base class, but is intended to be utilized by all class B and C objects. Which of the following statements are true? (2 points)

A.We can include a pure virtual function prototype, virtual double fun(); in class A.

B.If we include a virtual function in class A, as shown above, class A is now an abstract class.

C.We include the function definitions in classes B and C, or outside them, but using the scope resolution operator.

D.All of the above are true

E.None of the above are true

Answer: _____________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!