Question

• Task 5: displayEmptyBeds () should display a list of beds from the Ward that do not have patientsassigned to them. • Task 7: releasePatient() is the opposite of task

6. This method will ask the user for the health numberof a patient, and then free the bed that the patient has been assigned, so that the bed could beassigned to another patient. This method should not remove the patient from the HospitalSystem,nor should it change any of the associations between the patient and their doctor(s). In other words,the patient remains in the system, but is just not using a bed anymore. Implement the displayEmptyBeds() and releasePatient() methods in the provided HospitalSystemclass.After these are implemented, run the main() method of the HospitalSystem class, and demonstrate thatyour methods are working by doing something like this: Create a Ward with a few beds. Add at least one patient. Assign some patients to beds. Show the available beds has changed. Release at least one Patient. Show the available beds has changed. Copy-and-paste the console input/output into a file titled A5Q1_demonstration.txt. Don't make this acomplicated file to read. Keep it short. It's a demonstration, not a proof, and not a thorough test.You should of course test your methods thoroughly, but that's for your satisfaction, not for grades.Once everything is working, rename the class HospitalSystemA5Q1 before handing it in to Moodle. Thisrenaming is strictly to help with marking.

Question image 1Question image 2Question image 3Question image 4Question image 5Question image 6Question image 7Question image 8Question image 9Question image 10