Question: solve part 1 in java script Given the following UML diagram: Part 1: Implement the following classes: (60 pts) (class Building, Hospital University 10 pts
Given the following UML diagram: Part 1: Implement the following classes: (60 pts) (class Building, Hospital University 10 pts each and class City 30 pts) : Building -name: String -location: String +Building All Parameters) +getters/setters +toString(): String City -name: String -building: ArrayList +City All Parameters) +getName(): String +setNamel name: String): void +getBuilding():ArrayList +addUnversity(u :University): void +addHospital h:Hospital): void +SearchForBuilding(buildingName: String) Building +print Hospital():void +printUniversity():void +countBuilding():void +toString: String University -nbofstudent: int +University All nParameters) +getters/setters +toString: String Hospital -nbOfPatient: int -nbOfStaff :int +Hospital All Parameters) +getters/setters +toString: String The City class Methods' description: The addUniversity method adds university to the arraylist building. The addHospital method adds hospital to the arraylist building. The searchForBuilding method searches by building name in the arraylist building and return building. The printHospital method prints all the hospital in the arraylist building. The printUniversity method prints all the university in the arraylist building. The countBuilding method prints the number of all the buildings and how many hospitals and mitin 3:44 WA. .46% . - k CSC1300Lab Fina... @ CAP www in A dood | Aler M The first they were The method ide ople the building bu The pritet og in . The contending to be at the bones and home Part 2 Crawie 20 Courth the they were building how many gro Sample Run III O
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
