Writing a test plan and writing a c program with reasonable


This assignment should be done individually. The assignment consists of 4 parts:

1) Writing a test plan;

2) Writing a C program with reasonable comments and sensible variable names;

3) Test and documenting the testing of your c program

4) A report

The day field is a number with the following meaning

Number

Meaning

1

Sunday

2

Monday

3

Tuesday

4

Wednesday

5

Thursday

6

Friday

7

Saturday

8

The worker Died while Picking

9

The worker has 9 or more children

NOTE-1: Each file has between 2 and 10 lines

NOTE-2: Each file has a last line with a day of 0 the remainder of that line should be ignored (it will always have four fields of which the first and last are numeric)

NOTE-3: Times are in fractional hours (not HH:MM)

NOTE-4: Day 8 and 9 are special conditions for students wishing to get a grade of more than 74% for the assignment

NOTE-5: If you choose to process day 9 then you need to store the necessary vales in a suitable variable (eg array)for later processing. You may not read the file twice in the processing of a single menu option.

NOTE-6: Day 8 and day 9 records can occur anywhere in the file

Rates of pay:

The first 40 hours of work for the week is paid at minimum pay rate of $18.70 per hour worked

All pay on Sunday is paid at $33.73per hour worked

The overtime rate is $27.79per hour worked; Overtime must be paid for any hours over 40 worked in the period Monday to Saturday.

 Rates of pay (special conditions DI/HD extension part):

Due to the union agreement of 1827, and its amendment in 1932 (part B clause 57, 2nd dot point, paragraph 2) "any worker who dies while picking fruit shall receive payment of 500 silver coins of the realm as funeral expenses, delivered to next of kin.

In Australia in 1988 the $2 coin was minted and it became the official silver coin of the realm. Traitors are therefore paid $60 equivalent to 30 silver coins of the realm.

Under the hopelessly unfathomable fair work policy of successive governments and the union agreement of 1215 (See British Law - after all Australia is far too small to have its own laws). "it is necessary to pay a bonus of 5 silver coins of the realm to fruit pickers if it be that they have more than 8 dependent children; and that they labour 7.5 hours or more of toil in a single day."

Plain English translation

  • If you die while apple picking you get $1000;
  • If you have 9 or more kids at home you get a 10$ bonus any day you work 7.5 hours or more;

He needs the program to have the following options:

Option

Program Function

Notes

1 -Print a pay Cheque

 

Ask to enter file name:

 

Print out a nicely formatted cheque

 

 

2 - Payroll Report

 

Ask to enter file name:

 

Echo the input file data:

Sum the hours:

Display hours at minimum wage and total paid

Display overtime and payment

Display Sunday rate and payments

 

Print out a meaningful set of information to help explain how the pay cheque was calculated

 

Print out the cheque total

 

 

 

3 - Special Case processing (optional)

special rules for the following conditions:

 

a) Apple pickers that die while working.

b) Apple pickers that have 9 or more children if they workfor 7.5 or more hours on any day.

 

Ask to enter file name:

 

Compute and print out a pay slip and a nicely formatted cheque that includes death and children bonuses

This is the HD/DI extension its optional

4-exit

 

Exits the program cleanly

 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Writing a test plan and writing a c program with reasonable
Reference No:- TGS0995109

Expected delivery within 24 Hours