Write a program to help a XYZ company to automate its payroll system. Create a program that stores employee information and compute the salary
Write a program to help a XYZ company to automate its payroll system. Create a program that stores employee information and compute the salary using inheritance. Include necessary member functions to achieve the following tasks: Create the class employee that wil act as superclass with employee ID, employee fname, employee Iname, employee rate, days of worked as instance variables. Inherit the employee class to Full-time class, Part-time class, and Contractual class. Calculate gross salary, deductions, and net salary. All the information requires user input. Full-time Employee To get the Gross Pay = (Employee Rate Days of Worked) + Rice Allowance + Medicine Allowance + Uniform Allowance To get the Total Deductions = SSS +Pag-ibig PhilHealth To get the Net pay = Gross Pay Total Deductions Part-time Employee To get the Gross Pay = (Employee Rate* Days of Worked) To get the Net pay = Gross Pay Contractual Employee To get the Gross Pay = (Employee Rate * Days of Worked) To get the Total Deductions = SSS + Pag-ibig + PhilHealth To get the Net pay = Gross Pay Total Deductions Generate pay slip for al categories of employees. Create the objects for the inherited classes and invoke the necessary methods to dispay the pay slip. Sample Program Execution: Payroll System 1 Fulltime Employee 2 Part-time Employee 3- Contractual Choice....: 1 Enter Employee ID: 1001 Enter Employee First name: Juan Enter Employee Last name: Perez Enter Employee Rate: 800 Enter Days of Worked: 10 Enter Rice Allowance: 1000 Enter Medicine Allowance: 2000 Enter Uniform Allowance: 3000 Enter SSS: 600 Enter PhilHealth: 400 Enter Pag-ibig: 100 Payroll System 1 Fulltime Employee 2 Part-time Employee 3- Contractual Choice....: 2 Enter Employee ID: 1002 Enter Employee First name: Maria Enter Employee Last name: Lopez Enter Employee Rate: 500 Enter Days of Worked: 10 ******* PAY SLIP FOR PART-TIME EMPLOYEE ********* Employee ID: 1002 Payroll System 1 Fulltime Employee 2-Part-time Employee 3- Contractual Choice..... 3 Enter Employee ID: 1003 Enter Employee First name: Jeff Enter Employee Last name: Cruz Enter Employee Rate: 600 Enter Days of Worked: 10 Enter SSS: 500 Enter PhilHealth: 300 Enter Pag-ibig: 100 Last Name: Lopez PAY SLIP FOR CONTRACTUAL EMPLOYEE FirstName: Maria Basic Pay: 5000 Total Deductions: 0 PAY SLIP FOR FULL TIME EMPLOYEE ****** Net Pay: 5000 Employee ID: 1001 Employee ID: 1003 FirstName: Jeff Last Name: Cruz Basic Pay: 6000 Total Deductions: 900 FirstName: Juan Last Name: Perez Basic Pay: 14000 Do u wart to continue 0 to quit and 1 to continue: 1 Net Pay: 5100 Total Deductions: 1100 Net Pay: 12900 Do u want to continue 0 to quit and 1 to continue: 0 Do u want to continue 0 to quit and 1 to continue: 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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