help

E

Eric Wolfe

I need some guidance getting started on this project:
----------------------
Implement a class Employee as follows:

Constructor: An object of class Employee will have the hourlyRate as
an instance field.

Methods
o basePay(int hours): Calculates the amount paid for the first 40
hours.
o extraPay(int hours): Calculates the amount paid for all the hours
worked after the first 40 hours. The pay for extra hours is double the
pay for regular hours.
o totalPay(int hours): Calculates the total pay.


Write a short tester program that allows the user to input any
employee to print the total pay. Make sure when you test your file to
enter employees that have worked:
- less than 40 hours
- exactly 40 hours
- more than 40 hours
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top