CSE214
After many years of dealing with incomplete and inaccurate information about the classrooms
on campus, the faculty of Stony Brook have decided to band together to create a system that
will allow them to quickly reference the facilities present in each room, and search for rooms that
fulfil certain criteria. In order to have fast access to their large database of rooms and buildings,
they have decided to hire you to build a room information system that is based on hash maps.
You will be modeling the hash maps on the physical structure of campus, with one hash map
relating each building's name to its content hashmap. The content hashmap will relate the room
number to a classroom object containing all the relevant features of the room. You must be able
to add and remove buildings from the campus, as well as add and remove classrooms from
each building, and edit classrooms to reflect changes.
Additionally, you must implement a search function that will either search a building or the whole
campus for classes fulfilling certain criteria. For this assignment, you may use sequential search
(however, if the search involves only one building you definitely shouldn't search the whole
campus).
Finally, as the monkeys in the basement sometimes take a break from using the treadmill power
turbine generators, the power occasionally goes out and the system must be shut down and then
restarted without losing data. You must use Java Serialization to achieve this.
NOTE: All exceptions explicitly thrown in Required Classes except for IllegalArgumentException
are custom exceptions that need to be made by you.
Required Classes
1. Classroom
Write a fully documented class named Classroom that contains four private data fields: boolean
hasWhiteboard, boolean hasChalkboard, int numSeats, and String[] AVEquipmentList. This
class will be used to represent a classroom within Stony Brook.
This class must implement the Serializable interface.
private boolean his whiteboard
This field is true if the classroom has a whiteboard, false otherwise.
private boolean his chalkboard
This field is true if the classroom has a chalkboard, false otherwise.
private int numSeats
This field holds the number of seats the classroom has.
private String[] AVEquipmentList
This field holds the names of the AV Equipment that are supported in the room.
OPTIONAL: You can use List< String> as the data type, whichever is easier.
Getter and Setter methods for the above four member variables.
2. Building or Building HashMap< Integer, Classroom>
The database of Classrooms will be stored in a HashMap. Use the room number of the
classrooms as the key for the HashMap. In this assignment, you must use them
HashMap/HashTable implementation provided by the Java API. You may use inheritance if you
wish.
This class should also implement Serializable. interface.
number as the key.
room number is already in the Building.
Get Free Quote!
374 Experts Online