Question: TESTING: Perform a complete run of the program, and for each repetition, manually recalculate the results with standard calculator using the same input values/data. Compare

 TESTING: Perform a complete run of the program, and for each

TESTING: Perform a complete run of the program, and for each repetition, manually recalculate the results with standard calculator using the same input values/data. Compare the results with the results from your program.

5. Write a program to process weekly employee time cards for an employee of an organization. Each employee will have three data items: the employee's name, the hourly wage rate, and the number of hours worked during a given week (the maximum of hours should not exceed 60 hours per week; average only 12 hours per day and 5 days per week). Employees are to be paid with additional half of normal payment for the working hours that exceed 40 hours (if normal RM40 per hour, extra hour is RM40 + RM20 per hour). A tax amount of 3.625% of gross salary will be deducted from gross payment. The output should show the employee name, gross pay, and net pay. The program should not end but repeat the input session, unless user type the word QUIT for the name input. Implement and use array in your program. For this problem, you should figure out on your own the suitable place/section to implement the array. The marks will be given based on your creativity on implementing the array and the appropriateness of the array usage. Examples of output (underlined texts are the input given by user): . Name (type QUIT to stop): Mr Ronaldo De Caprio Rate per hour (RM): 80.50 Hours completed (hours) : 45 PAYMENT RECEIPT- Name: Mr Ronaldo De Caprio Rate per hour (RM): 80.50 Hours completed (hours) : 45 Basic payment (RM): 3220.00 Extra payment (RM): 603.75 Total (RM): 3823.75 Formula: basic = 80.50 x 40 hours extra = 120.75 x 5 hours gross = basic + extra : = Tax charged (RM): 138.61 NET PAYMENT (RM): 3685.14 tax = 3.625% of gross net = gross - tax Name (type QUIT to stop): Mr Ronaldo De Caprio Rate per hour (RM): 80.50 Hours completed (hours): 90 Invalid input: Hours worked entered exceeds maximum limit (60 hours) Name (type QUIT to stop): QUIT Program finish

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!