CSci 161 A

Second exercise set

Due:  Tuesday, September 23

Create an Employee class with instance variables as follows:

(the names you use for these variables are up to you.  The class name must be Employee)

Write a constructor with arguments for the employee's name, rate of pay, and hours worked (only).  The constructor should initialize internal variables and calculate the employee's pay.  Employee pay should be computed as hours work times rate of pay for any value of hours-worked less than or equal to 40 hours.  Any additional hours should be paid at 1.5 times the rate of pay.  Do this in an efficient way.

Write a public method called report (all lower case) which takes no arguments, but which prints out the employee's name, rate of pay, hours worked, and pay.  Do not worry about formatting the rate of pay, hours worked, or pay (we'll see how to do this later).

All classes and methods should adhere to the standards listed in appendix J in the textbook. 

Turn in:  The deliverables for this exercise will be

Employee Name Rate of Pay Hours Worked
Brown 20 35
Fansler 25 40
Wolfe 20 50

(Question:  Why these three?)  To record the results of your test on a single sheet of paper, copy the results of individual runs from the terminal window (one at a time or all at once) into a text file (or Word document), and then print that page and attach it to the class listing.