Question: Using the principle of inheritance, write a program that creates classes as depicted on the figure; also you need to apply the following: For the
Using the principle of inheritance, write a program that creates classes as depicted on the figure; also you need to apply the following:
For the supper class Community Member create 3 variables (name, age, gender) and 3 methods( sayName( ), sayAge( ), say Gender ( ).
For Employee class; it is required to have a new variable and method such as Nationality and sayNathionality( ) .
For Student class; it is required to have a new variable and method such as Student ID and say Student_ID ( ).
Creating 3 objects for each class to display:
The name (for all classes)
The nationality (for Employee class)
The student ID (Student class)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
