[Solved]Ja Va 3 25 Points Define Following Method Modify Return Type Paramters 0 Points Boolean Al Q37255978
Ja va 3 (25 points) Define the following method (DO NOT MODIFY THE RETURN TYPE OR PARAMTERS-0 POINTS IF YOU DO): boolean allPatientsfint I hospitals, int extraPatients) This method should take an integer array parameter (hospitals) and an integer parameter (extroPatients). The method should check elements in the integer array to check if they are greater than or equal to 4. If a value in the integer array is not greater than four, the amount needed to make the value 4 should be deducted from the integer parameter checked or the value of the integer parameter extraPatients falls below 0. . The method should only stop checking integer values in the array if all elements have been The method should return false if the final value of the integer parameter is less than 0 and true otherwise wher the method exits. Possible Sample Run (using the following main public static void main(String [ args) int [ hospitals (0,4,2); boolean beallPatients(hospitals, 6); System.out.printin(b) This hospital needs 4 more patients. Extra patients left: 2 This hospital has 4 or more patients. This hospital needs 2 more patients. Extra patients left: 0 false Show transcribed image text Ja va 3 (25 points) Define the following method (DO NOT MODIFY THE RETURN TYPE OR PARAMTERS-0 POINTS IF YOU DO): boolean allPatientsfint I hospitals, int extraPatients) This method should take an integer array parameter (hospitals) and an integer parameter (extroPatients). The method should check elements in the integer array to check if they are greater than or equal to 4. If a value in the integer array is not greater than four, the amount needed to make the value 4 should be deducted from the integer parameter checked or the value of the integer parameter extraPatients falls below 0. . The method should only stop checking integer values in the array if all elements have been The method should return false if the final value of the integer parameter is less than 0 and true otherwise wher the method exits. Possible Sample Run (using the following main public static void main(String [ args) int [ hospitals (0,4,2); boolean beallPatients(hospitals, 6); System.out.printin(b) This hospital needs 4 more patients. Extra patients left: 2 This hospital has 4 or more patients. This hospital needs 2 more patients. Extra patients left: 0 false
Expert Answer
Answer to Ja va 3 (25 points) Define the following method (DO NOT MODIFY THE RETURN TYPE OR PARAMTERS-0 POINTS IF YOU DO): boolean… . . .
OR

