Question: CODE IT IN JAVA THX!!! THIS A PROBLEM ABOUT TWO LINKED CLASSES !!! JUST FOLLOW THE INSTRUCTIONS AND WRITE THE STRUCTURE!!! The Building class The

CODE IT IN JAVA THX!!!

THIS A PROBLEM ABOUT TWO LINKED CLASSES !!! JUST FOLLOW THE INSTRUCTIONS AND WRITE THE STRUCTURE!!!

CODE IT IN JAVA THX!!! THIS A PROBLEM ABOUT TWO LINKED CLASSES!!! JUST FOLLOW THE INSTRUCTIONS AND WRITE THE STRUCTURE!!! The Building classThe Building class is pretty straight forward as you can see below.You can tackle this even before you're finished with your Student classin problem 1. Building -buildingName: String -numberFloors: int -campusLocation: String +Building (name:String, floors: int, campus: String) +getBuildingName (): String +getCampus (): String +hasMoreFloors

The Building class The Building class is pretty straight forward as you can see below. You can tackle this even before you're finished with your Student class in problem 1. Building -buildingName: String -numberFloors: int -campusLocation: String +Building (name: String, floors: int, campus: String) +getBuildingName (): String +getCampus (): String +hasMoreFloors (otherBuilding: Building): int +toString(): String Description of methods from the Building class: +Building (name: String, floors: int, campus: String) Constructs a building with building name, number of floors and located on the specified campus name. +getBuildingName () : String Returns the building name. +getCampus (): String Returns a campus that a building is located on. thasMoreFloors (otherBuilding: Building): int Compares the number of floors that the building has to another Building object. It returns the number of floor that it has more than the other one if taller the numberinnocitie thasMoreFloors (otherBuilding: Building): int. Compares the number of floors that the building has to another Building object. It returns the number of floors that it has more than the other one. If taller, the number is positive (i.e. returning 3 implies that it has more floors that then "other building"). If equal, the two buildings are of the same height. If negative, the other building is the taller of the two. +toString(): String Overrides the existing string representation of the object to be: building-name + " building (" + num-floors + " floors), " + campus + " campus" The Room class The Room class relies on the Building class as previously created. Room -building: Building -roomNumber: int -roomCapacity: int +Room (building: Building, room: int, capacity: int) +getBuilding () : Building +getRoomCapacity (): int +setRoomCapacity (capacity: int): void +toString(): String +setRoomCapacity (capacity: int): void Sets a new capacity for a room (e.g. if the room was expanded during a remodel). +toString(): String Overrides the existing string representation of the object to be: building-name + " building, Room " + roomNumber + " (seats " + capacity + ")

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!