You are on page 1of 1

GLA 02: Create a class that calculates and tracks the amount of money an

employee should be paid (Your program should track unpaid hours).

Hints:

-Create a class called Employee / Complete the missing parts of the Employee class.
-Add member variables to store the employee’s name, hourly wage, and how much money they are
currently owed.
-Add the following methods to the class:
    a) void Work(double hours) – update the amount of money that the employee is  
       owed according to their wage and number of hours worked.
    b) double Pay() – Pays (Returns) the amount of money that the employee is
       owed, and sets the amount owed to 0.

-Match the program's output amounts that are paid to them before they start to work and after they
work the given hours.

Sample Input/Output:

You might also like