Menu

(Solved) : Payroll Processing App Optionals Type Casting Create Macos Project Command Line Tool Payro Q32968304 . . .

Payroll Processing App–Optionals and TypeCasting

Create a macOS project (Command Line Tool), for a payrollprocessing application to be used by a higher-education institution(college/university). The application is to calculate the paymentto be made to each employee at the end of each pay period. Assumeemployees in this institution are paid monthly. For each employee,the monthly payment will be the sum of the employee’s monthlysalary and any overtime pay for that month.

1) Begin by creating a class Employee. Eachemployee has a name and an annualsalary. Add a computed property monthlypay. Be sure to include a class initializer.

2) There are two categories of employees in this institution:faculty and staff. Staff employees may work over time and when theydo, the overtime pay of a staff employee is calculated as theproduct of the employees overtime hourly pay rate and the number ofhours worked.

Faculty may teach extra classes and get paid for their over timeteaching load based on the number of credit hours and teaching payrate per credit hour. The teaching overtime pay rate (per credithour) is the same for all faculty.

Create two subclassed of class Employee: onefor  staff and one forfaculty based on the above specifications. Note:you need to decide which properties to include for each, the typeof each property, and whether the property should be an instanceproperty or a type property.

3) Write a function that takes an Employeeinstance and returns the total payment to be made to the employeefor the pay period. Your function should use type casting todetermine how to calculate the total payment depending on the typeof employee.

4) Write a piece of code to test your application. Your testcode should:

a) Prompt the user to enter the employee’s category.

b) Based on the employee category entered, create an employeeinstance of the appropriate class.

c) Prompt the user to enter the rest of the employeesinformation and populate the instance.

d) In the above step, validate all numerical input (in eachcase, use a loop that keeps prompting the user until a valid inputis entered).

e) Calculate the employees payment by calling the function step3 above and display the output in the format:

Employee name:

Employee category:  

Payment:

Assignment Delievrables: Submit a copy of yourcode in a textfile and screenshot of your program’s excution fortwo test cases (a faculty and a staff).

Bonus (20% extra): Instead of creating thisproject for the macOS console, create an iOS application to do thesame. Need to demo your app for the bonus credits.

Prefered Language is “SWIFT”

pease i need help with this assignment

Expert Answer


Answer to Payroll Processing App Optionals Type Casting Create Macos Project Command Line Tool Payro Q32968304 . . .

OR