Question: Java Programming 5 CLASS UNIVERSITY An object of this class will represent a single university. 5.1 fields int id : A unique id number String

Java Programming 5 CLASS UNIVERSITY An object of this class will representJava Programming

5 CLASS UNIVERSITY An object of this class will represent a single university. 5.1 fields int id : A unique id number String name : A unique name int numofPositions : A positive number that denotes how many positions the university has available this year. minsat: The minimum SAT score that the university will accept. Note though that during the matching process we can disable that and let the matching process complete as no minimum is set. a Studentlist that will be used to store the admitted students. You can use any name you like. you can add more as needed 5.2 methods University(id, name, numofPositions, minSAT): A constructor that initializes the above fields. getId, getName, getNumOfPositions, getMinSAT : Getter methods void activateMinSAT(boolean value) : Activates or deactivates the use of the SAT threshold during the matching process. It will be called before the matching process begins. boolean admit(Student value) : Decides whether to admit a student or not. If the student is admissible, it is added to the list of admitted students and returns true, otherwise it returns false. getAdmittedStudents : Returns the Studentlist of the admitted students. It can be called at any time, even during the matching process. It assumes that the caller will not modify the returned list but wants it only for inspection. lastAdmittedStudentSAT : Returns the lowest SAT score among the students that were admitted to the university. void resetAdmissions : Clears the internal storage of the admitted students and frees any memory that was previously allocated for it. It's useful if we want to rerun the matching process with different parameters (e.g. activate/deactivate the min SAT score). tostring : Overrides the default method. Don't forget the @override annotation. It represents a university in the form of id: name, e.g. 113: George Mason University equals(object other): Overrides the default method and compares this University to the other university. Don't forget the @override annotation. It returns true if the two universities have the same id and name

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!