Question: Deliverables person.java student.java professor.java TA.java app.java Contents Using inheritance and the class Person (below) Create an application that: Creates 1 student, 1 professor, 1 TA.
Deliverables
person.java
student.java
professor.java
TA.java
app.java
Contents
Using inheritance and the class Person (below)
Create an application that:
Creates 1 student, 1 professor, 1 TA.
student is a person with a status ("traditional" or "non-traditional") and a major
professor (a person with a degree attribute, a string with "Ph.D" or "MsC.")
TA (a person with communications skills attribute, an int value from 1 to 10)
Displays all information about each instance
Does it in the most efficient way possible (avoids unnecessary duplication)
Uses the classes
person and student available on Canvas below
student already inheriting from person in the example below
Adding a major to the student class
Creating a display method in student to solve the lab
Note:
The way it is now, it does not display major or status.
The correct solution has to display major and status.
You have to create professor and TA from scratch.
**No changes needed in the code of person.java**
Suggestions for Getting to the Solution
Figure out how to display the info for student reusing the class person.
Once you have solved step 1, implement the solution for professor. It is very similar to student.
Do the same for TA.
Submit your zipped Netbeans project on Canvas.
The example used in the lesson and listed below is here
as a NetBeans project.
class app { public static void main(String[] args) { student st1 = new student("Zack","Mills",21); System.out.println(st1.getInfo()); } } //============================== class person { String firstName; String lastName; int age; person(String informedFirstName, String informedLastName, int informedAge) { firstName = informedFirstName; lastName = informedLastName; age = informedAge; } String whatIsUp() { return "undetermined"; } String getName() { return firstName +" "+lastName; } String getAge() { String str = String.valueOf(age); return str; } String getInfo() { return ("Name = "+ getName() + " age="+ getAge()); } } //========================================= class student extends person { String status; student(String informedFirstName, String informedLastName, int informedAge) { super(informedFirstName, informedLastName, informedAge); if (age Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
