RoomBookingMS is the program used to manipulate with users, rooms and bookings of the room booking management system.
There are 13 classes in total.
- Main class: has main method and starts the program
- User class: to create user objects
- UserDB class: to store users in user array
- Room class: to create room objects
- RoomDB class: to store rooms in room array
- Booking class: to create booking objects
- BookingDB class: to store bookings in room array
- Action class: deals with reading and executing available commands
- Add class: deals with methods associated with add command
- Delete class: deals with methods associated with delete command
- Save class: deals with methods associated with save command
- Load class: deals with methods associated with load command
- Token class: used to tokenize the user input
The following line should be used to run the program
javac Main.java
java Main Room.db User.db Booking.db
The program has error handling function and can deal with errors like:
-
Failing to open an input file: FileNotFoundException in Add class:
-
Failing to open an output file: Exception in Action class
-
Errors happening when performing file IO operations: if-else statements for all input cases
-
Corrupted data in the input files: if-else statement for all file reading cases
- IntelliJ IDEA CE
- Sanzhar Nussipbek
- Department of Computer Science, Hong Kong Baptist University
- Dr. Joe CK Yau