Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Your manager has asked you to write a script that displays how much an employee should be paid based on the following payroll system.
3. Your manager has asked you to write a script that displays how much an employee should be paid based on the following payroll system. Rules Conditions/ Courses of Action 1 2 3 4 5 6 S H S H S H Condition Stubs Employee type Hours worked 40 >40 x | Action Stubs Pay base salary Calculate hourly wage Calculate overtime Produce Absence Report Your script should prompt the user to enter the Employee Type (S or H) and the number of hours worked. The script should then determine the pay information based on the payroll system presented above. The action stubs are: Pay base salary: The base salary is $500. Calculate hourly wage: Hourly wage should be calculated as Hours worked multiplied by hourly rate - which is $10. Calculate over time: Overtime is 1.2 times of the hourly wage. Overtime should be added on top of the hourly wage (i.e. number of hours worked above 40 are considered overtime) Produce Absence Report: Absence Report should display the number of hours the employee is missing For example, according to payroll system rule1, a S (salary) employee who worked less than 40 hours should be paid the base salary. Payroll system rule2 states that an H (hourly) employee who worked less than 40 hours should get an hourly wage calculated based on the number of hours the employee has worked and should also get presented an absence report that shows the number of hours employee is missing (40 hours - the number of hours the employee has worked). For each employee who uses the script should be displayed the pay amount they will receive (i.e. You will be paid X dollars this week) and if necessary, the absence report (i.e. Your absence report includes Y number of hours this week)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started