Question: C sharp please Declare the abstract Person class that describes a human and the Student class that derives from Person. The attributes in each instance
C sharp please
Declare the abstract Person class that describes a human and the Student class that derives from Person. The attributes in each instance of type Person should include: name, age and id. The attributes in each instance of type Student should include, in addition to those that inherited from class Person, the attribute average. Create a third class Employee that inherits from Person but includes a field for department and company name. In the Person class, write an abstract method, ToString(), that returns the fields of an object. Write getters and setters for the attributes of all three classes. Then create a container to store Person objects and use the ToString() method to demonstrate how polymorphism works
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
