Describe the purpose of the items after the colon (:) in this code.
In the code for HourlyEmployee that is derived from Employee, the constructor code
appears
What will be an ideal response?
```
HourlyEmployee::
HourlyEmployee(string theName,
string theNumber,
double theWageRate,
double theHours
)
: Employee(theName, theNumber),
wageRate(theWageRate),
hours(theHours)
{
// deliberately empty
}
```
The call, Employee(theName, theNumber), invokes the base class
constructor to initialize the data members in the members of HourlyEmployee
that are inherited from the base class Employee. The next two items,
wageRate(theWageRate) and hours(theHours) are initializers for the
data members wageRate and hours in the derived class.
You might also like to view...
All the following are file attributes EXCEPT
A) Reserved; Application B) Hidden; System C) Archive; Hidden D) Read Only, Archive
What attribute is used to set the width of a TEXTAREA element?
(a) COL (b) COLS (c) COLSPAN (d) SPAN