221k views
0 votes
Assuming the definition,

class BasePlusCommissionEmployee : public CommissionEmployee

Which of the following is false?
1. The colon ( : ) in the header of the class definition indicates inheritance.
2. The keyword public indicates the type of inheritance.
3. All the public and protected members of class BasePlusCommissionEmployee are inherited as public and protected members, respectively, into class CommissionEmployee.
4. CommissionEmployee is the base class and BasePlusCommissionEmployee is the derived class.

User Joxixi
by
5.1k points

1 Answer

0 votes

Answer:

3. All the public and protected members of class BasePlusCommissionEmployee are inherited as public and protected members, respectively, into class CommissionEmployee.

Step-by-step explanation:

The colon ( : ) indicates inheritance. However, in this notation CommissionEmployee is the base class and BasePlusCommissionEmployee is the subclass.

The subclasses can inherit members and functions from the base class. Since BasePlusCommissionEmployee is the subclass, it must be the one that inherits, not CommissionEmployee class.

User Pachonjcl
by
5.2k points