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
```
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.

Computer Science & Information Technology

You might also like to view...

What is wrong with the following statement?

cout << “Hello to everyone\n; a. cout should be count b. missing a semicolon c. missing a “ d. missing a (

Computer Science & Information Technology

HTML5/CSS3 expanded the functionality of media types to enable them to check the user agent (or output device because a printer is not really a user agent) to determine particular media features such as width and height.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

System analysts sometimes ____ an existing system to get a better picture of its operation.

A. view B. identify C. outline D. model

Computer Science & Information Technology

When a user opens an infected application file or document, a(n) ____ attaches itself to the application and infects other files accessed by the same application.

A. macro virus B. worm C. Trojan D. logic bomb

Computer Science & Information Technology