In C# please and thanks so much,
Create an Employee class with five fields: first name, lastname, workID, yearStartedWked, and initSalary. It includesconstructor(s) and properties to initialize values for allfields.
Create an interface, SalaryCalculate, class that includes twofunctions: first,CalcYearWorked() function, it takes one parameter(currentyear) and calculates the number of year the worker has beenworking. The second function, CalcCurSalary() function thatcalculates the current year salary.
Create a Worker classes that is derived from Employee andSalaryCalculate class.
- In Worker class, it includes two field, nYearWked andcurSalary, and constructor(s). It defines the CalcYearWorked()function using (current year – yearStartedWked) and save it in thenYearWked variable. It also defines the CalcCurSalary() functionthat calculates the current year salary by using initial salarywith 3% yearly increment.
Create a Manager class that is derived from Worker class.
- In Manager class, it includes one field: yearPromo andconstructor(s). Itincludes a CalcCurSalary function that calculatethe current year salary by overriding the base class function usinginitial salary with 5% yearly increment plus 10% bonus. Themanager’s salary calculates in two parts. It calculates as a workerbefore the year promoted and as a manager after the promotion.
Write an application that reads the workers and managersinformation from files (“worker.txt†and “manager.txtâ€) and thencreates the dynamic arrays of objects. Prompt the user for currentyear and display the workers’ and managers’ current information inseparate groups: first and last name, ID, the year he/she has beenworking, and current salary.
Please make streamreader read text from file and the new line sothat the text files stay original.
TEXT FILES:
worker.txt
Hector
Alcoser
A001231
1999
24000
Anna
Alaniz
A001232
2001
34000
Lydia
Bean
A001233
2002
30000
Jorge
Botello
A001234
2005
40000
Pablo
Gonzalez
A001235
2007
35000
manager.txt
Sam
Reza
M000411
1995
51000
2005
Jose
Perez
M000412
1998
55000
2002
Rachel
Pena
M000413
2000
48000
2010