Question: In C# windows form. create a new project (class library), define a base class Employee with the following fields: _firstname, _lastname, _employeeID, _dateOfHire Constructor and

In C# windows form. create a new project (class library), define a base class Employee with the following fields:

_firstname, _lastname, _employeeID, _dateOfHire

Constructor and properties

Methods:

GetBi-WeeklySalary(), which returns the salary for month of work. Make this method abstract GetAccruedVacation(), which returns the number of vacation time earned by the employee.

Vacation accrued follows the following rule:

Employee earns 1 week of vacation a year for the first 3 years of service,Then earns an extra day of vacation every year after that for the next 7 years.Vacation time will not change thereafter

(this method should not be abstract) GetSeniority().Which should return the employee years of service (from hire time to now), (this method should not be abstract)

Define a class SalariedEmployee that inherits from Employee. Add extra field _yearlySalary

The SalariedEmployee accrue vaction as a regular employee (defined in the Employee class)

The GetByMonthlySalary should return the yearlySalary divided by 26

Define a class, HourlyEmployee that inherits from Employee.

Add extra fields: _hourlywage and _numberofhoursWorked (during half of a month). The ByMonthlySalary is equal to: _hourlywage * _numberofhoursWorked

For the GetAccruedVacation, the HourlyEmployee gets no vacation time the first 5 years of service, then earns half a day every year after that, until 20 years of service. Vacation time

remains unchanged after 20 years of service.

Define a class Manager that inherits from SalariedEmployee. The manager accrues 2 weeks of vacation after 1 year of service for up to 5 years of service. The manager then earns a day of extra vacation every year after 5 years of service. The maximum a manager can accrue is 25 days of vacation time..

windows Forms Application

In Form1: Create a List of Employees

Add a method in Form1 to preload the list of employees with at least 5 SalariedEmployees, 5

HourlyEmpolyes and 3 Mangers. The list should be preloaded when the application starts.

Provide GUI to create any of the employee types listed above

Provide Gui to display all employees

Provide a button to display all employees with a given seniority (read from a textbox)

(example you want to display all the employees who have been here 5 years or more)

If possible make necessary adjustments to any class to be able to increase the salary of any

employee selected in Form1. (you can select an employee by index into the list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!