Question: You need to design a GUI interface for an online Lab reservation application. You should model your system using the following classes: Class Time from
You need to design a GUI interface for an online Lab reservation application. You should
model your system using the following classes:
Class Time from Assignement#: Add a toString method that returns a String
representation of a Time object as follows: day month year @ hour : minutes
Class Lab:
Five private data attributes: int number, int capacity, String location, Boolean
status and Time bookingDate.
A constructor that initializes number, capacity, location and status.
Set and get methods for each attribute.
A toString method that returns a String representation of a lab object as
follows:
If the status is false : Lab number location capacity "Available"
else: Lab number location capacity "Reserved on: bookingDate.
Class Account:
Three private attributes: String name, int id and int password.
A constructor that initializes name, id and password.
Set and get methods for each attribute.
A toString method that returns a String representation of an Account object
as follows: name id
Class Admin which is also an Account:
Two private data attribute: Lab labs and int size.
A constructor that calls the superclass constructor to initializes the inherited
fields, initializes size and creates the array labs with the specified size.
addLabLab newLab method that adds a newLab object to the array labs.
getLabs method that returns the array labs.
Class Employee which is also an Account:
One private data attribute: String role.
A constructor that calls the superclass constructor to initializes the inherited
fields, and initializes role.
Set and get methods for attribute role.
Override the inherited toString method to return a String representation of
an Employee object as follows: role. name id
Class ReservationSystemGUI:
It has the following private data attributes:
Five objects:
Admin: name: "Dana", id: password: size:
Employee: name: "Abeer", id: password: role: "Eng"
Employee: name: "Asma", id: password: role: Dr
Employee: name: "Ahmad", id: password: role: Dr
Arraylist of type Account to store the previous objects.A JComboBox component that includes a list of all department labs
using the array labs from admin account.
A JComboBox component that includes a list of all months.
Checkboxes for reservation requirements, such as "Eclipse software",
"Safe Exam Browser", "Internet", "Printer", etc.
All GUI components needed for the given interface in the sample
outputs with all events handling.
Add the following Labs to the array labs using the Admin object:
false
false
false
false
false
Exception handling must be used to handle any invalid input from the user
without crashing.
printToFile method that prints the lab reservation information in a text file.
Test.java:
Main method that creates an object of class ReservationSystemGUI.
Show the frame and set the size to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
