Question: Create two Java subclasses of your Person class called Student and Teacher. For the Student class, include the following attributes college and dorm. The Teacher

Create two Java subclasses of your Person class called Student and Teacher. For the Student class, include the following attributes college and dorm. The Teacher class needs the following attribute room # and one or more courses. For the add courses, our assignment requires that we use an ArrayList Group. You must have your constructors and methods for your classes including a method for printing the attributes.

Also, there shoud be a StudentTest and TeacherTest to test data for the classes.

Here is what the teacher wants: 3 java files - Person.java , Teacher.java, Student.java

Person.java:

has these attributes: fname, lname, age, gender, ssn

use getters/setters, use toString

Teacher.java:

has these attributes:

roomNumber, courseList

** for the add courses, he requires that we use an array list in the teacher.java file

for the arraylist, use the addCourse()

use toString

Student.java has these attributes:

college name, getters and setters, dorm name, and ToString

For student test and teacher test , we are to not get input from keyboard, but put data in the java files.

***** THIS IS THE THIRD TIME I AM TRYING TO GET THIS PROGRAM RIGHT, MAYBE I AM NOT EXPLAINING WHAT IS NEEDED

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!