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.

This is the outline of what our teacher wants:

Person.java

fname getters/setters
lname toString
age
gender
ssn

Student.java

collegename getters/setters dormname toString

Teacher.java
roomNum getters/setters
courseList

addCourse() ArrayList Group

toString

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!