Ask Programming Language Expert

Major concepts: ? LOOP, IF, FUNCTIONS, POINTERS, ALIGNED OUTPUT, and VERIFY DATA
This is a WEEKLY pay calculating and writing program. The program accepts input from the user and generates pay stub forms for each employee like the sample below. The forms MUST line up EXACTLY as in the following example.
Special note:
You will have to count the spacing to get it to look correct. The first 2 lines of numbers you see are NOT part of the output. Also the first 2 numbers on each line on the left side are row or line numbers and are also NOT part of the output. These numbers are to show you how to align the output. In the form below you will see 2 versions of line 6. This is explained in requirement 1 below.
xx0000000001111111111222222222233333333334444444444555555
xx1234567890123456789012345678901234567890123456789012345
01Yourname Payroll Systems
02102 Orfus Road, Downsview ON
03
04Employee Number: 999 For Week Ending: YYYYMMDD
05
06Salary Paid :999999.99
06Hourly Rate: 99.99 Hours Worked: 99.99
07
08GROSS PAY: 9999.99
09
10DEDUCTIONS:
11Long Term Benefits: 99.99
12Employment Insurance: 999.99 
13Canada Pension Plan: 9999.99
14Federal Tax: 9999.99 
15
16TOTAL DEDUCTIONS: 9999.99
17
18NET PAY: 9999.99
Requirements for the program
1 Either the "Salary Paid:" line (06), or the "Hourly rate:" and "Hours worked:" line (06), will appear on the form.
Not both. The one that appears will depend on the type of employee. The above sample shows both lines, but
you should ONLY print the correct line.
2 Overtime rate. For hourly paid employees, the rate of pay for hours in excess of 44 is at 1.5 times the
normal rate of pay.
3 Long-term benefits (LTB) are charged at $2 per every full $100 of gross weekly earnings to a maximum
LTB payment of $100 per week. An example of a gross weekly pay of $163 will result in a $2 LTB deduction,
as there is only one full $100 amount. Make sure you understand the requirement.4 Employment Insurance (EI) is 1.4% of gross pay to a maximum of $11.80 per week. Everyone pays it.
5 Canada Pension Plan is paid by everyone and is 1.6% of gross pay on the first $700 of earnings in a week. 
6 Federal taxes are paid by everyone and is calculated based on what a person would earn for a full year.
The rates are: 16% on the first $20,000 earned annually
23% on the next $20,000 earned annually
29% on the remainder earned annually
As this is a weekly pay, you will have to assume hourly paid people will make the same amount every week for
52 weeks per year to calculate their annual salary.
7 Provincial Tax which is collected along with the Federal Tax, is an additional 47% of the Federal tax
collected. The 2 amounts, Provincial and Federal tax, are shown as the one figure Federal Tax on the form.
8 The program must LOOP until the user decides they have done enough. Use a few n to separate the
question and the inputs from the output for readability.
9. The program must have these modules/functions as a minimum and demonstrate pointers
(i) Controlling the decision to loop ie. The question that asks them if they want to input data for another
employee. This answer must be a character ('Y' or 'y') and not 1 for yes etc 
(ii) The inputs 
(iii) The 4 deductions - long-term benefit calculation (LTB),
(iv) - Employment insurance (EI),
(v) - Canada pension plan (CPP),
(vi) - Federal and Provincial tax (FT and PT).
(vii) The output form
This program requires a minimum 7 modules or functions and of course the main () function.
10. No global variables allowed. 
11. Deductions will occur for names that are not meaningful, improper indents or alignment, lack of blank
lines, missing program documentation at the beginning and clearly distinguishing the end of main and the
beginning of the functions and for other factors that make the program poor to read and understand. This
MUST be very easy to read and understand...quickly.
You should test your program with a greater variety of test data than shown below, but for the purposes of this
assignment you are to turn in the output from using at least the following test data. None of these values are
hard coded into the program. This is test data, the program should work with real data, so do not assume
things like, there are only 6 employees or that the salary employees have employee numbers greater than
400.
Empno Hourly Hours Rate
Salary Worked
111 h 35 $ 15.75 per hour
222 h 44 $ 40.00 per hour
333 s $752,000 per year
444 h 50 $ 85.00 per hour
555 s $125,000 per year
666 s $ 40,000 per year
Submission:
See your teacher's assignment submission requirements.
Note the user inputs h or s and not
1 or 2 

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9641907

Have any Question?


Related Questions in Programming Language

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As