# dtr

• September 5th, 2012, 08:32 PM
belle1991
dtr
can any one help me to solve this problem,..

PROG131 - Computer Programming

Instruction:

DTR or Daily Time Record is a form which details each employee's total hours of work daily at the time of arrival and departure from office in the morning and in the afternoon. Employees must report on duty at exactly 08:00 AM in the morning until 12:00 NN. And in the afternoon, they must time-in at exactly 13:00 (1:00PM) until 17:00 (5:00PM).

Create a program that will read the employee’s DTR from the textfile named EmployeeDTR.txt. Extract the contents of the textfile and calculate the number of hours work for each employee. Display the employee’s number of hours worked in hours in minutes. Display also the date of the DTR. Use military time format. Disregard the late & early in or out.

1. A method to calculate the number of hours worked from time in until time out in hours and minutes.
2. A method to display your output

You can also create additional methods such as:
1. Methods used to read the contents of the text file

Output the employee profile in the manner given below. [Your output should be the same with the output below]: Refer to the table for the Salary rate of an employee based on his/her rank.

Rank Salary Rate / day
1 Php 380.00
2 Php 450.00
3 Php 550.00

To get the Monthly Salary Rate of an employee, multiply the employee’s Salary Rate/day by 26 (number of working days in a month). Use the DecimalFormat class to format employee’s Monthly Salary Rate.

Here is a sample output:

EMPLOYEE’s Daily Time Record
Day: Monday, July 4, 2011
-----------------------------------------------------------------
EmployeeID : 2006-0031
Lastname : SULLIVAN
Firstname : Jamie
Position : Worker
Rank : 2
Rate : Php 11,700.00

Morning
IN : 08:00
OUT : 12:00
Afternoon
IN : 13:00
OUT : 17:00
Total hours worked: 8 hrs and 0 mins
-----------------------------------------------------------------
EmployeeID : 2001-0001
Lastname : SMITH
Firstname : John
Position : Manager
Rank : 3
Rate : Php 14,300.00

Morning
IN : 07:46
OUT : 12:00
Afternoon
IN : 12:30
OUT : 17:10
Total hours worked: 8 hrs and 54 mins

-----------------------------------------------------------------
EmployeeID : 2010-0008
Lastname : JONES
Firstname : Tim
Position : Worker
Rank : 1
Rate : Php 9,880.00

Morning
IN : 08:01
OUT : 11:55
Afternoon
IN : 13:00
OUT : 16:55
Total hours worked: 7 hrs and 49

any suggestion is highly appreciated.
• September 6th, 2012, 08:14 PM
curmudgeon
Re: dtr
Please do not solicit help from forum members by private messaging them.
• September 6th, 2012, 10:57 PM
jps
Re: dtr
Quote:

Originally Posted by belle1991
can any one help me to solve this problem,..
..................
any suggestion is highly appreciated.

What seems to be the problem?