Requirements

Inputs: 

The user enters: 

·         Employee name 

·         Age 

·         Pay Rate

·         Number of hours worked on Weekend, e.g., 0.2, 0.5, 1.5 etc.

·         Number of hours worked on Bank Holidays, e.g., 0.2, 0.5, 1.5 etc.) 

·         Number of weekday hours (excluding bank holidays) worked, e.g., 0.2, 0.5, 1.5 etc.) 

Processing:   

The program calculates basic pay, overtime pay, gross pay, tax, and net pay, based on the following rules. 

·         Basic Pay: Staff working weekdays are paid at the basic pay rate.    

·         Overtime Pay: If a member of staff works over 37 hours on weekdays, the additional hours are paid at time and a quarter (1.25 x basic pay rate). 

·         Weekend Pay: Staff working weekends are paid time and a half (1.5 x basic rate)  

·         Bank Holiday Pay: Staff working bank holidays are paid double time (2 x basic pay rate). 

·         Tax: Tax is calculated using the emergency tax rate of 22%. Staff under 18 pay no tax. 

 Outputs: 

·         Gross pay 

·         Tax 

·         Net Pay 

Example: 

Input: 

·         Employee name: Jeanette Adams 

·         Age: 21 

·         Pay Rate: £10.20  

·         Number of hours worked on Weekend: 8   

·         Number of hours worked on Bank Holidays: 7  

·         Number of weekday (not bank holidays) hours worked: 40  

 Processing:  

·         Basic Pay = £377.40 

·         Overtime pay = £38.25   

·         Weekend Pay = £122.40 

·         Bank Holiday Pay = £142.80 

·         Gross pay = £680.85 

·         Tax = £149.79 

·         Net Pay = £531.06 

Output: 

·         Gross pay = £680.85 

·         Tax = £149.79 

·         Net Pay = £531.06 

 




最後修改: 2023年 09月 28日(週四) 10:01