1. Make a windows application in Visual Studio and name it as A2FirstnameLastname.
2. Design and implement a Windows Form application that keeps track of the employees in a company and their salary information. The application calculates an employee's wages and allow users to review employee information of any previously added employee.
NOTE: At no point should the application save any information to disk. All information is stored and managed in memory using a collection. The use of collections and the object-oriented design of the solution are an important part of the evaluation of your submission.
3. Design a form that looks something like the one below:
Fig. 1: Employee Salary Calculation with Overtime: see image.
Fig. 2: Manager Salary Calculation with Bonus see image.
4. Ensure all names follow the naming conventions used in class.
5. Ensure the form is displayed centered on the screen.
6. Ensure the tab order of all controls is set correctly.
7. User enters the name of an Employee, hourly wage and hours worked and whether the employee is a manager or not.
8. Upon clicking on "Calculate", the application shall calculate and display the gross earnings, taxes and net earnings.
9. Add the employee names to the combo-box when the user is entering new employees. The combo-box shall ONLY display the employee name and no other information.
10. The application shall keep track of the employees using the most appropriate collection.
11. Upon selecting an existing employee, display the wage information associated with it including earnings.
12. The "Clear" button shall clear all the fields of the form with the exception of the Employee combo- box.
13. The "Close" button shall close the form. When the user closes the application ask the user for confirmation whether they truly want to close or not.
Classes:
14. Create a class Employee.
15. Implement Earnings() method that returns the earnings of an employee, considering any overtime.
16. Inherit class Manager from Employee.
17. Override the Earnings() method to calculate the manager's earnings.
18. Call the Earnings() method polymorphically in your app.
Exception Handling:
15. Protect all event handlers with try-catch control structures and display all errors resulting from the input validation using MessageBoxes. Validate the input as follows:
a. The name of the employee is not allowed to be empty.
b. The name of the employee should be unique.
c. The hourly wage has to be a positive real number.
d. The hours worked has to be a positive real number and cannot exceed 80.
16. The error messages should be clear and understandable.
a. Something like, "Name field can not be left blank".
b. Not like Invalid input.