Develop a console application that has the following:Write an abstract class called Employee that has:a. An Employee Id field that is automatically incremented each time aderived Clerk or Manager class is created.b. A property for employee ID.c. A property for the employees last name.d. A property for the employees first name.e. An abstract method for hiring an employee (all you need to do is to returna string when this method is called that states that an employee has beenhired. In this string mention the employee type and the employees firstand last name. Since this method is abstract you will implement theappropriate functionality in the derived inheritance hierarchy class).f. An abstract method for firing an employee (you need to state the type ofemployee fired as well as last name and first name). Since this is anabstract class you will implement this functionality in the derived classg. Have a constructor that is used to populate the property information.h. Have a ToString method to print out object state as well as the totalnumber of employees created at the time of using the ToString method.Write a Manager class that has the following:a. The Manager class is derived from the Employee class.b. A property for getting and setting the type car a Manager gets from thecompany (managers are allowed a car).c. A method for this class that implements the abstract Hire method definedin the Employee class. Remember that all you need to do is to return astring when this method is called that states that a Manager has beenhired along with the Managers last and first name.d. A method for this class that implements the abstract Fire method definedin the Employee class. Similar to c make sure that your returned stringstates the employee type (Manager) and the managers last and firstname.e. Appropriate constructors for this class.f. An appropriate ToString method to print out object state.Write a Clerk class that has the following:a. The Clerk class is derived from the Employee class.b. A Boolean property for telling whether the position is unionized (not allclerks are union employees).c. Implement the methods needed to hire and fire clerical employees.d. Appropriate constructors for this class.e. An appropriate ToString method to print out object state.Write a class below that tests your inheritance hierarchy (your Employee, Clerkand Manager classes):a. Instantiate 1 Manager with the name of Bill Gates that gets a FordMustang.b. Instantiate a second Manager with the name of Carol Smith gets aChrysler PT Cruiser.c. Instantiate a Clerk with the name of Hilda Smith who is not unionized.d. Instantiate a Clerk with the name of Harold Jonese. Fire Bill gates.f. Hire Hilda.g. Instantiate a Manager named Leo Banes who does not get a car yet.h. Print the data associated with each employee using polymorphism (i.e. putyour employees into a collection and use the ToString method to print outthe appropriate object information. Use a collection to store your differentemployee objects and then in a loop print out the appropriate objectinformation using polymorphism. Remember also to print out the currenttotal of employee objects.
Uncategorized
[Solved] C# Programming: Inheritance
$25
File Name: C#_Programming:_Inheritance.zip
File Size: 254.34 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.