Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: dtr

  1. #1
    Junior Member
    Join Date
    Sep 2012
    iligan city,philippines
    Thanked 0 Times in 0 Posts

    Unhappy dtr

    can any one help me to solve this problem,..

    PROG131 - Computer Programming


    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.

    Create the following methods that will help you solve the tasks:
    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

    IN : 08:00
    OUT : 12:00
    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

    IN : 07:46
    OUT : 12:00
    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

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

    any suggestion is highly appreciated.
    Last edited by belle1991; September 5th, 2012 at 08:34 PM.

  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    My Mood
    Thanked 140 Times in 135 Posts

    Default Re: dtr

    Please do not solicit help from forum members by private messaging them.

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: dtr

    Quote Originally Posted by belle1991 View Post
    can any one help me to solve this problem,..
    any suggestion is highly appreciated.
    What seems to be the problem?
    What is your question?
    What have you tried so far resulting in your question/problem?

    This looks more like a homework dump rather than a question.
    Feel free to elaborate on your post by answering my questions posted above, including your code and any related error messages you may have.