Class Hospital


  • public class Hospital
    extends Object
    Author:
    ngonga
    • Field Detail

    • Constructor Detail

      • Hospital

        public Hospital​(int idValue,
                        int capacityValue,
                        double[] preferences)
    • Method Detail

      • grantAdmission

        public int grantAdmission​(int resident)
        Processes an application. If queue full, then get student out that has the smallest weight
        Parameters:
        resident - ID of resident who apply
        Returns:
        ID of resident that was kicked out or -1 in case none was kicked out