Question: Question 1 This question concerns a simple College Management application written in Java First, here is the college class representing an individual college in the


Question 1 This question concerns a simple College Management application written in Java First, here is the college class representing an individual college in the system. A college has a name, a principal (head teacher) and a list of students. * package colleges: 2 simport java.util.List; import java.util.ArrayList: public class College protected String name; protected Teacher principal: protected List Student students = new ArrayList(); public College(String name. Teacher principal) { this.name a name: this.principal - principal: 3 public String getName() { return name : } protected Student makeStudent(String String 2 return new Student (f. 1): public void add(Student s) { students.add(s): 3 public void add(String f. String 1 students.add(makeStudent (2) 3 (a) This class includes examples of each of the following code features. In each case, identify where the feature occurs, and briefly explain why it is used. 1. Method overloading (4 Marks) II. An interface type combined with an implementation class (4 Marks) Question 1 is continued on the next pago Question 1 continued A factory method iv. A read-only property Dynamic polymorphism (4 Marks) (4 Marks) (6 Marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
