Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

CODING + DESIGNING WAGES PROGRAM

rachcuzzrachcuzz Member Posts: 1
[B]Hi anyone - I've just started learning Pascal but I'm not too good at it. ANY HELP AT ALL WITH THE FOLLOWING PROGRAM WOULD BE BRILLIANT _ THANKYOU!![/B]

I need to write a manufacturing program for work to produce each week the wages paid to employees. Currently working on 2 shifts A/B paid in the following way:
Shift A - 10 for each shift attended and 4 for each additional hour.
Shift B - 12 for each shift attended and 5 for additional hour.
However, these are subject to change from week to week.
The required output needs to be in the form of a report with each detail line to include
Clock card number,
Employee name,
Number of shifts attended in the week,
Total hours worked,
Shift attendance for week and
Additional hours for week.

The footer has to include totals for:
Number of employees,
Total Attendance pay for all workers and
Total additional hours pay for each worker.

The employee data is stored on a text file of which I have the definition for.
To ensure the solution produced is acceptable each Emp record needs to be validated with:
Clock card number range 1000 to 9999
Tax code - 3 digits and 1 letter (L or H)
Shift attended - A or B
Shifts worked - range 1 to 7
Any emp record which fails any of the above must be written to an error file with all other data validated previously.
The date and week number is to be input by user and the rates of pay for the two shifts is to be input by user and validated by program. the Attendance rate should be between 1 and 100 per shift and the Additional hour rates should be between 1 and 10.
The user must be allowed to re-enter any of the rates which fail the above test.
Once again any help at all with the above would be great even if only an algorithm or anything at all.
Thankyou
Rachel

Comments

  • nicklagernicklager Member Posts: 1
    : [B]Hi anyone - I've just started learning Pascal but I'm not too good at it. ANY HELP AT ALL WITH THE FOLLOWING PROGRAM WOULD BE BRILLIANT _ THANKYOU!![/B]
    :
    : I need to write a manufacturing program for work to produce each week the wages paid to employees. Currently working on 2 shifts A/B paid in the following way:
    : Shift A - 10 for each shift attended and 4 for each additional hour.
    : Shift B - 12 for each shift attended and 5 for additional hour.
    : However, these are subject to change from week to week.
    : The required output needs to be in the form of a report with each detail line to include
    : Clock card number,
    : Employee name,
    : Number of shifts attended in the week,
    : Total hours worked,
    : Shift attendance for week and
    : Additional hours for week.
    :
    : The footer has to include totals for:
    : Number of employees,
    : Total Attendance pay for all workers and
    : Total additional hours pay for each worker.
    :
    : The employee data is stored on a text file of which I have the definition for.
    : To ensure the solution produced is acceptable each Emp record needs to be validated with:
    : Clock card number range 1000 to 9999
    : Tax code - 3 digits and 1 letter (L or H)
    : Shift attended - A or B
    : Shifts worked - range 1 to 7
    : Any emp record which fails any of the above must be written to an error file with all other data validated previously.
    : The date and week number is to be input by user and the rates of pay for the two shifts is to be input by user and validated by program. the Attendance rate should be between 1 and 100 per shift and the Additional hour rates should be between 1 and 10.
    : The user must be allowed to re-enter any of the rates which fail the above test.
    : Once again any help at all with the above would be great even if only an algorithm or anything at all.
    : Thankyou
    : Rachel
    :
    Hi

    Just wondering if you managed to sort this problem out, because I'm stuck with it as well?

    Nick

  • CoolanimalCoolanimal Member Posts: 3
    program Wages (input,output);
    {begin Statement}
    uses wincrt;
    var
    HoursWorked:Real;{number of hours worked per week}
    RateOfPay:Real;{hourly rate of pay}
    GrossWage:Real;{weekly wage before tax deductions}
    Tax:Real;{weekly wages after tax deduction}

    {end declaration}
    begin
    Write('Input The Number Of Hours Worked=>');
    ReadLn(HoursWorked);
    Write('Input Hourly Rate Of Pay=>');
    ReadLn(RateOfPay);
    Write('Input Rate Of Tax=>');
    ReadLn(tax);
    GrossWage:= HoursWorked*RateOfPay-Tax;
    WriteLn('Weekly Wage In Euro''s', GrossWage:6:2);{wages}
    Writeln;{next line}
    Writeln;{next line}

    end.
    {end sequence}

    Copy this above code into the turbo pascal 1.5.

  • Justin BibJustin Bib USAMember Posts: 0

    __ [ http://forcoder.org ] free ebooks and video tutorials about \ Objective-C MATLAB Assembly Go Perl Visual Basic Swift C R C++ Scratch Delphi Python Visual Basic .NET PL/SQL Java C# Ruby PHP JavaScript Bash ABAP Crystal Fortran Julia FoxPro Lisp Prolog LabVIEW Alice SAS Scheme Apex Logo Dart ML Awk Hack F# Clojure Erlang COBOL VBScript Kotlin Transact-SQL Lua Ada Rust D Scala \ __________

Sign In or Register to comment.