Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java programming language, implement class Residence assuming all the other classes are implemented. You need to document your code using Javadoc for full marks.

image text in transcribed

Using Java programming language, implement class Residence assuming all the other classes are implemented. You need to document your code using Javadoc for full marks. Make sure to include the author using the proper tag. Additional clarifications: The method addRoom checks if the room is in the HashMap. If the room is already in the HashMap, the capacity is updated. Otherwise, the room along with the capacity is added. The method calculateAvailableCapacity returns the available capacity calculated as follows: "Total capacity - number of students". The total capacity is calculated by adding the capacity of each room. Building -name: String Person Campus - name: String - ID: int people: ArrayList - buildings: ArrayList + print Buildings():void + main(String 11 args) vold + Building + Building (String name, double size): + getName(): String + getid:int + setName(String name): void Extends Extends Extends Extends Instructor LectureBuilding Student - courses: ArrayList -grades: HashMap HashMap evaluations Residence students: ArrayList lectureHalls: HashMap + addLecture Hall(String roomName, Integer capacity): void + calculate TotalNumberRooms(): Integer toString(): String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

What is the coefficient for QUANTITATIVE, b2?

Answered: 1 week ago

Question

explain the five essential elements of an enforceable contract

Answered: 1 week ago