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.

  • Assume a federal tax of 15%.
  • Assume a regular employee is paid overtime wages which are calculated as 1.5 times the hourly wage for any hours over 40 hours a week.
  • Assume a manager is not paid overtime but it is paid a performance bonus of 20% of the earned income.

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.

  • The employee names should be unique.
  • Style the combo-box as DropDownList.

10. The application shall keep track of the employees using the most appropriate collection.

  • Employee and Manager must be implemented as classes that stores all the information of an employee.

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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.