Which of the following class definitions makes the public members of the class aClass become the public members of the class bClass?

A. class aClass: public bClass
{
//...
};
B. class bClass: public aClass
{
//...
};
C. class bClass: aClass
{
//...
};
D. class aClass: bClass
{
//...
};

Answer: B

Computer Science & Information Technology

You might also like to view...

What is the ten-step business process review methodology?

What will be an ideal response?

Computer Science & Information Technology

What changes need to be made to the following class in order to change it to a template class?

class containerClass { public: containerClass(); containerClass(int newMaxSize); containerClass(const containerClass& source); ~containerClass(); int getItem(); int getCount(); int getSize(); void addItem(int item); private: int *bag; int maxSize, count; }; a. add the template prefix b. change all occurrences of int to T c. change the parameter type of addItem to T d. change the return type of getItem to T e. change the return type of getSize to T f. change the parameter type of the implicit constructor to T g. A and B h. A and C and D i. A and C and D and F

Computer Science & Information Technology