Question: Develop and test the following C# classes: Person class has three member variables: name, age, hairColor. Provide the necessary constructors, and set functions (methods); *
Develop and test the following C# classes:
Person class has three member variables: name, age, hairColor.
Provide the necessary constructors, and set functions (methods);
* Employee class is the child of Person and has two new member variables: employeeID and salary.
Provide the necessary constructors, and set functions (methods) for the new member variables;
* Student class which is child of Person as well and has two new member variables: studentID and program the student is registered. Provide the necessary constructors, and set functions (methods) for the new member variables;
* Professor class which is child of Employee and has two new member variables: title (such as Professor and Associate Professor) and department the professor works for.
Provide the necessary constructors, and set functions (methods) for the new member variables;
Test the C# code by creating objects of the above classes and take a screenshot of the output window.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
