Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Apply learnt skills to solve engineering problem using MATLAB. Scenario: Write a program that can be used by a company to calculate both the gross

Apply learnt skills to solve engineering problem using MATLAB.

Scenario:

Write a program that can be used by a company to calculate both the gross pay (before any deductions) and the net pay (after deductions such as tax, pension contributions, ..) for their employees each week. As the program runs it should ask the user to input the number of hours worked, the hourly rate of pay, the current weekly tax threshold, the current tax rate as a percentage, and whether the employee has opted in to the company pension scheme. The company has both part-time and full-time staff, on different rates of pay, and any time worked up to 40 hours in the week is paid at the employee's normal hourly rate. Any time worked in excess of 40 hours in a week is paid at 1.5 times the normal hourly rate. For the pension contribution parameter of the program, set it as 0 if they are not in the pension scheme and 1 if they are. Use appropriate code in the program to recognise this option. If the user enters an incorrect value for this parameter, a suitable warning message should be printed and no further calculations should be carried out. For any gross pay above the weekly tax threshold, a certain percentage (dependent on the current tax rate) is deducted as tax from the employee's earnings. If an employee has opted in to the pension scheme, then 6% of their gross pay is deducted for their pension contribution. Employees do not pay tax on their pension contributions, so these must be deducted from the gross pay before considering if tax is to be paid. The program should print out a summary of the hours worked, the hourly rate of pay, the gross pay, the pension contribution, the tax paid and the net pay. If an employee has worked in excess of 40 hours, it should also print out the overtime hourly rate.

Run your program for the following test cases;-

a) 16 hours worked

i. Rs 870/- as the normal hourly rate of pay

ii. Rs 17500/- as the current weekly tax threshold

iii. 20% as the current tax rate

iv. Opted in to the company pension scheme

b) 36 hours worked

i. Rs 1115/- as the normal hourly rate of pay

ii. Rs 18500/- as the current weekly tax threshold

iii. 20% as the current tax rate

iv. Not opted in to the company pension scheme

c) 40 hours worked

i. Rs 1135/- as the normal hourly rate of pay

ii. Rs 19500/- as the current weekly tax threshold

iii. 22% as the current tax rate

iv. Opted in to the company pension scheme

d) 62 hours worked

i. Rs 1465/- as the normal hourly rate of pay

ii. Rs 20500/- as the current weekly tax threshold

iii. 25% as the current tax rate

iv. Opted in to the company pension scheme

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Select suitable tools to analyze service problems.

Answered: 1 week ago