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 1: Rooms Database

Design a class Room with the following properties:

  • roomNo string,default: ???
  • type integer, (0,1,2,3) default 0
  • capacityinteger,default: 0

Write a constructor and a method to print details of a Room on the console.

Amend your Room class by writing the following additional methods:

  • methods to set and get the properties of a Room
  • a method to ask the user for details of a Room
  • a toString() method. This should display the room type as Classroom, Lecture Theatre, Laboratory; if the room type is 0 the room type is displayed as blank.

You are advised to write a simple application to test all your methods.

Develop a menu driven application which will enable the user to:

  • add a room to the database,
  • display details of all rooms,
  • display details of a room given the room number.

Your application should incorporate data validation where appropriate.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only 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 fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.