The School of Computing is allocated a certain number of rooms for teaching students. A database is to be formed with information about all the rooms. Members of staff will be able to interrogate the database to find which types of rooms are available; they will also require a feature which enables them to book a room.

Each Room has the following properties:

  • Room Number (String)
  • Room Type (Integer) 1=Classroom, 2=Lecture Theatre, 3=Practical Lab, 0=Other.
  • Capacity (Integer)

The application is to be built in two stages:

  • Stage 1: Rooms Database
  • Stage 2: Room Booking

You are required to develop the prototype of such a system, the prototype is being developed to test the system; all input will be via the keyboard.

Stage 2: Room Booking

Members of staff need to interrogate the database produced in stage 1 to determine details about rooms that are available.

Illustrate the concept of inheritance by developing a class Classroom which has the properties of a Room and, in addition:

  • a property that indicates if the classroom is booked;
  • a property that contains the name of the member of staff to whom the room is booked.

Design, implement and test the Classroom class.

For the prototype, the room booking system will be implemented as a menu-driven console application. The application will have the following essential features:

  • Display all rooms that are booked
  • Display all rooms that are not booked
  • Book a room given the name of the member of staff
  • Unbook a room

Additional features that are be required:

  • Display rooms of a particular type
  • Display rooms of a particular type that are not booked and have enough room for a given number of students

Discuss how these additional features could be implemented. You are not required to implement these additional features, however you may find it helps your discussion if you do so.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.