Question: Goal: In this lab, we will practice how to apply both the inheritance and composition concepts to write a Department class. 1. Implement the Department
Goal: In this lab, we will practice how to apply both the inheritance and composition concepts to write a Department class. 1. Implement the Department Class. Implement the following class: public class Department * The basic feature of a department / private String deptName; private int numMajors; private Teacher[] listTeachers; //inherits from Person class private Student[] listStudents; //inherits from Person class *Construct a department object (at least TWO constructors) */ Accessors and mutators (one pair per each feature) */ /* toString method */ Fill in the blanks above according to the guidelines in the comments. Also write a main method that will use one of constructors to create two Department objects. Your main method should print out the details of these two Departments (each department with at least 5 students and 3 teachers)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
