| | |
Wage Calculator for Employees
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2008
Posts: 32
Reputation:
Solved Threads: 0
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
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
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.
Last edited by jasimp; Mar 29th, 2008 at 7:31 pm.
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
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:
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.
java Syntax (Toggle Plain Text)
BufferedReader input = new BufferedReader( new InputStreamReader( System.in ));
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.
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend. ![]() |
Other Threads in the Java Forum
- Previous Thread: java
- Next Thread: Help.Thread Priority
Views: 1903 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Java
2dgraphics account android api apple applet application arguments array arrays automation banking binary binarytree bluetooth chat chatprogramusingobjects class classes client code component database derby design draw eclipse encryption error event exception file fractal game givemetehcodez google graphics gui helpwithhomework html ide if_statement image input integer interface j2me java javadesktopapplications javaprojects jmf jni jpanel julia linux list loop map method methods midlethttpconnection mobile multithreading netbeans newbie number object oracle print printing problem program programming project recursion reference remove ria scanner screen search server set size sms socket sort sourcelabs sql stop string swing test threads time tree ui unicode validation windows






