Lab Quiz 3 - Employee class
Due at the end of lab period.
Submit these 2 files to your directory on neelix, in a folder called RU03.
Download these two files:
Employee.java - a class file which represents an
employee - YOU COMPLETE THIS
labquiz3.java - the driver program which tests the
Employee class - DO NOT CHANGE THIS
Your job is to finish writing the Employee class. Here is the UML diagram for Employee:
Employee
|
- name : String |
+ Employee ( empname : String,
rate : double ) + calcPay ( hours : double ) : double + toString ( ) : String |
Here's a sample run for the driver program:
Program outputs: | Please enter an employee name: |
User inputs: | Sam Smith |
Program outputs: | Enter the hourly rate for Sam Smith: |
User inputs: | 8.75 |
Program outputs: | How many hours did Sam Smith work? |
User inputs: | 42 |
Program outputs: | ---------------------------------- Sam Smith Payrate: $8.75 per hour Paycheck is $376.25 ---------------------------------- |
You will need to submit 2 files (labquiz3.java
and Employee.java ) to a folder called RU03 in your folder on neelix.