Professional Documents
Culture Documents
AJP Microproject
AJP Microproject
AJP Microproject
Engineering
Subject – AJP
Microproject Topic:
Online Guest Reservation System using Java
Online Guest Reservation System using Java
Introduction
The "Online Guest Reservation System using Java" is a software project aimed at
creating an efficient and user-friendly online reservation system. This system
facilitates the reservation of guest accommodations through an online platform. In
recent years, online reservation systems have gained immense popularity as
businesses strive to simplify their booking processes and enhance customer
convenience. In today's fast-paced world, businesses, particularly those in the
hospitality sector, face the challenge of meeting customer demands for quick and
convenient reservations. Traditional methods often involve manual bookings,
which can be time-consuming and error-prone. To address these challenges,
businesses are increasingly turning to online reservation systems. This project
aligns with the real-world scenario where businesses seek to adapt to digital trends
and provide a more efficient booking experience. The "Online Guest Reservation
System using Java" offers several benefits for businesses such as Increased
Efficiency, Reduced Workload, Improved Customer Experience, Real-Time
Management. The core functionality of this system includes Reservation Creation,
Reservation Viewing, Reservation Cancellation.
Objectives:
1)Develop a console-based Java application for making, viewing, and canceling reservations.
2)Provide a user-friendly interface for both guests and businesses.
3)Implement a reservation ID system for easy tracking and management.
4)Enable real-time reservation monitoring to improve business operations.
5)Enhance efficiency by reducing manual workload and errors in reservation management.
The Online Guest Reservation System targets two main user groups:
Customers and Guests:
Individuals looking to make reservations at various establishments such as restaurants, hotels,
and event venues.
Users seeking a hassle-free and convenient way to book their desired services.
Services to be provided:
The Online Guest Reservation System will offer the following key services:
Reservation Creation: Guests can easily make reservations by providing their name, desired date, and
the number of guests in their party.
Reservation Viewing: Both guests and businesses can view a list of all reservations, including
reservation details such as name, date, and number of guests.
Reservation Cancellation: Guests or businesses can cancel reservations by providing the reservation ID,
ensuring a straightforward process.
Efficient Reservation Management: Business owners can efficiently manage and monitor reservations
in real-time, allowing for improved resource allocation and customer service.
User-Friendly Interface: The system will feature an intuitive and easy-to-navigate console-based
interface to ensure a positive user experience.
import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;
class Reservation {
private int id;
private String name;
private String date;
private int numberOfGuests;
class ReservationSystem {
private List<Reservation> reservations = new ArrayList<>();
private int nextId = 1;
class ReservationSystemUI {
private ReservationSystem reservationSystem = new
ReservationSystem();
while (true) {
System.out.println("1. Make a reservation");
System.out.println("2. View all reservations");
System.out.println("3. Cancel a reservation");
System.out.println("4. Exit");
switch (choice) {
case 1:
System.out.print("Name: ");
String name = scanner.nextLine();
System.out.print("Date: ");
String date = scanner.nextLine();
System.out.print("Number of guests: ");
int numberOfGuests = scanner.nextInt();
scanner.nextLine();
Reservation reservation =
reservationSystem.makeReservation(name, date, numberOfGuests);
System.out.println("Reservation made with ID " +
reservation.getId());
break;
case 2:
System.out.println("Reservations:");
for (Reservation r :
reservationSystem.getReservations()) {
System.out.println(r.getId() + " - " +
r.getName() + " - " + r.getDate() + " - " + r.getNumberOfGuests());
}
break;
case 3:
System.out.print("Reservation ID to cancel: ");
int id = scanner.nextInt();
scanner.nextLine();
if (reservationSystem.cancelReservation(id)) {
System.out.println("Reservation canceled");
} else {
System.out.println("Reservation not found");
}
break;
case 4:
return;
default:
System.out.println("Invalid choice");
}
System.out.println();
}
}