Implement (write and test code) a set of classes for a firm
1. Implement (write and test code) a set of classes for a firm. The firm has three kinds of employees. All employees have the following information need to be recorded
name, SSN, title, base salary.
The following table shows the details of each kind of employees.
Each type of employees needs to provide methods to return the monthly payment amount and process the annual raise of the base salary.
Then, design a class which can maintain all employees. This class needs to use an array (size 9000) to store all employees.
• a method, newemployee, to add a new employee to the array;
• a method, payment , to calculate monthly payment amount for every employee;
| Regular employee | Contractor | Sales |
Monthly Payment | Base salary + award (for the employee with a manager title, award is 1000$, for other employees, award is 500$) | Base salary | Base salary + 5% of total sales |
Annual raise of base salary | 5% | 3% | 5% |
a method, annualraise, to raise the base salary for every employee.
12 years ago
Purchase the answer to view it
- employee.zip