Help, Please help me with a program that will prompt the user for the following:

1. First Name
2. Last Name

3. Hourly or Salary

a. If hourly then ask for the following

i. Hours worked
ii. Pay Rate
1. If the hours worked is greater than 40 hours then you must calculate total pay for the first 40 hours at the pay rate given and then calculate hours above 40 at time and a half


b. If salary then ask for a level (You should have at least 2 levels for salaried folks)

i. Level 1 is for recent college grads who are trying to work their way up the ladder and get paid poor wages for a 40 hour work week. (But really they expect 60 hours from you)

ii. Level 2 is for executives who have been there long enough to be in a position to hire college grads to do all their work for them so they can enjoy their weekends and evenings.

iii. The bottom line is just set to constant variables with the yearly salary for either level and calculate the pay based on bi-weekly pay schedule.

4. Be able to print/show the results for the date taken in after all data has been entered.

5. Please put this into a loop that will allow more than one entry.


Thanks for your time and patience
-CHEERS

Recommended Answers

All 2 Replies

Post any work you have done on it and ask specific questions regarding your code. We will not do your work for you. Read this.

I am assuming that your main question is about accepting user input since that is underlined. You will need to use an InuputStream of some form or another for the standard input of System.in to accept input from a console. Something like:

BufferedReader input = new BufferedReader( new InputStreamReader( System.in ));

will set up a buffered reader for you that reads from standard input. Then you can use the BufferedReader's readLine() method to read a single line of input.

As for the rest of your program, as jasimp said we aren't allowed to do it for you but we will answer specific questions. Have a try and repost if you get into trouble. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.