Question: in ( Java programming language) please help me with it thank you Post lab A HighSchool application has a super class: Person. Using inheritance, you


in ( Java programming language) please help me with it thank you
Post lab A HighSchool application has a super class: Person. Using inheritance, you will create two new classes, Teacher and Student. A Teacher will be like Person but will have additional properties such as salary (the amount the teacher earns) and subject (e.g the Person class with additional properties (student ID and GPA) You can start with following classes: er Science, 'Chemistry. 'English, 'Other"). The Student class is derived from class Person protected String name; II name of the person protected int age; l person's age protected String gender; I/ "M" for male, "F" for female public Person(String name, int age, String gender)t this.name name; this.age age; this.gender gender @Override public String toString)( return name+ ", age:"+ age+".gender: " +gender Requirements i. Add "setters" and "getters" for all instance variables in the Person class and Student class. i. Write Student class that extends the parent class Person. a) Add two protected instance variables to the class for id (int) and GPA double). Choose appropriate names for the instance variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
