Results 1 to 5 of 5
Thread: computing hour & Salary
- 08-07-2009, 06:19 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 8
- Rep Power
- 0
computing hour & Salary
i have tried the code above to enter time in/out..Java Code:BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String data = timein,timeout; System.out.println("Enter the time-in: "); timein = br.readLine(); System.out.println("Enter the time-out: ");
but my problem is how to compute the time (timeout-timeout) and automatically it will display the salary of the employee?
e.g.
Time In : 8:00
Time Out : 17:00
DailyRate : 350
The display should be like this:
No. of Hours : 8 hrs
Salary : 350
this scenario, sometimes the employee has late, so that if the no of hours is incomplete.. his salary for that day is based on his hour of work..
hope you get my point pls..
thanks in advance..
- 08-07-2009, 08:48 AM #2
look into DateFormat class. But the easy way is to use String.split(":") then call Integer.parseInt() on each value in the array.
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 08-07-2009, 04:07 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 8
- Rep Power
- 0
oh i see? kindly give me sample sir.. i really dont have any idea regarding java..
- 08-07-2009, 08:19 PM #4
don't need sample, thats too trivial. Give it a try first.
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 08-07-2009, 10:17 PM #5
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
Similar Threads
-
HELP!! Assignment due in one hour!
By murr0508 in forum New To JavaReplies: 1Last Post: 02-26-2009, 09:31 PM -
Computing the sum
By Limuh in forum New To JavaReplies: 3Last Post: 08-13-2008, 06:00 AM -
[SOLVED] Very Simple 2-3 hour project $50
By arbit3r in forum Jobs OfferedReplies: 3Last Post: 08-05-2008, 03:20 AM -
weekly salary
By dollakay in forum New To JavaReplies: 2Last Post: 05-09-2008, 02:46 PM -
Calculating per hour statistics
By vipergt89 in forum New To JavaReplies: 2Last Post: 05-01-2008, 06:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks