[HELP] Program to compute for Employee's daily wage

This is a discussion on [HELP] Program to compute for Employee's daily wage within the C++ Programming forums, part of the General Programming Boards category; Problem Description. You are hired by a small company to create a program that computes the daily wage of its ...

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    10

    [HELP] Program to compute for Employee's daily wage

    Problem Description.

    You are hired by a small company to create a program that computes the daily wage of its employees.

    The employees are required to time-in when they arrive to work and time-out when they leave work.

    The company's regular working hours is from 8 A.M. to 5 P.M.

    Lunch break, which is mandatory, is from 12:00 noon to 1 P.M. During lunch break, the company closes its office and forces every employee to eat lunch. The employees are not required to time-out and time-in during the lunch break.

    There is no early time-in. Any time-in before 8:00 A.M. is considered as coming in at exactly 8:00 A.M.

    Over-time is considered only if the employee has already worked for at least 8 hours.

    The regular hourly wage of the company for all employees is 40 pesos. The overtime hourly wage for all employees
    is 60 pesos.

    Problem Specification.

    Create a C++ program that computes the daily wage of the company's employees.
    The program asks for the time-in and time-out information of an employee. The input will be four numbers separated by
    a space (or a newline). The first two numbers correspond to the time the employee arrived. The last two numbers correspond the time the employee left for the day.
    For example if the employee arrived at 8:30 A.M. and left at 5:15 P.M., the input is 8 30 5 15

    The program prints as its output the following:
    1) the employee's total regular working hours
    2) the employee's total overtime
    3) the daily regular wage
    4) the daily overtime wage
    5) the daily total wage (regular + OT)

    I have been going at this for a week now but I really can't solve it. I'll fail my course if I don't get this problem. I'd be very very very grateful to anyone who can help me solve this problem. Hints? Clues?

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Quote Originally Posted by Kipper DeVera View Post
    I have been going at this for a week now but I really can't solve it.
    Where's the code you've been going at for a week? Please post it if you want help.

    EDIT: And please read our Homework Policy if you haven't already
    Devoted my life to programming...

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,262
    Do it on paper; transcribe what you have as instructions; post those instructions.

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Please help - Program to Compute Cost
    By abdool_raheem03 in forum C++ Programming
    Replies: 3
    Last Post: 08-13-2011, 08:18 PM
  2. Employee Object Oriented Program (3 files)
    By Bulls2012 in forum C++ Programming
    Replies: 1
    Last Post: 05-24-2011, 06:17 PM
  3. C# compute program
    By shady_shockerz in forum C# Programming
    Replies: 2
    Last Post: 02-10-2009, 06:43 PM
  4. Replies: 10
    Last Post: 03-13-2008, 11:04 AM
  5. Minimum Wage Increase (US)
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 07-31-2006, 06:02 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21