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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started