0% found this document useful (0 votes)
10 views29 pages

Mini Software Isc

The document outlines a Hotel Management System program developed by Rajiv Seth, designed to simulate the booking process at Hotel Red Star in Singapore. It includes functionalities such as room selection, customer registration, billing calculations, and payment processing, while also detailing the hardware and software used. Limitations of the program include issues with room availability checks, single-user interaction, and lack of data persistence.

Uploaded by

Rajiv Seth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views29 pages

Mini Software Isc

The document outlines a Hotel Management System program developed by Rajiv Seth, designed to simulate the booking process at Hotel Red Star in Singapore. It includes functionalities such as room selection, customer registration, billing calculations, and payment processing, while also detailing the hardware and software used. Limitations of the program include issues with room availability checks, single-user interaction, and lack of data persistence.

Uploaded by

Rajiv Seth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

MINI

SOFTWARE

On Hotel Management
- developed by Rajiv
Seth
CONTENTS:

SL. NO: DESCRIPTION: PAGE NO:


1 Objective 2
2 Expected 2–4
Outcome
3 Hardware 4
Used
4 Printer 4
5 Software used 4
6 Methodology 4–7
7 Limitations 7–9
8 Mini Software 9 – 25
Program
9 Output 25 - 27
OBJECTIVE:
The objective of the **Hotel Management System**
program is to simulate the process of booking a room in
a hotel, specifically **Hotel Red Star** in Singapore. The
program aims to:

1. **Welcome customers** and provide information about the


hotel, including its history and features.
2. **Allow customers to book rooms** by choosing from various
room types (King Suite, Queen Suite, AC Deluxe, Non-AC
Deluxe) based on availability.
3. **Gather customer information** during the registration
process, including personal details such as name, gender,
address, occupation, and the purpose of the visit.
4. **Calculate the total bill** based on the number of days
stayed, the selected room type, additional charges (for extra
adults/children), and any optional services like complimentary
breakfast.
5. **Display the final bill** to the customer, including taxes and
the net amount, and offer a method of payment.
6. **Provide detailed descriptions** of each room type to help
the customer make an informed decision when selecting a
room.

The program uses interactive menus and random availability of


rooms to simulate a real-world hotel booking scenario.

EXPECTED OUTPUT:
This Java program simulates a hotel management
system for booking rooms at "Hotel Red Star" in
Singapore. Below is a summary of the expected output:

1. **Welcome Message:**
- The program starts with an ASCII art welcome message
showcasing the hotel name and a description of the hotel,
emphasizing its heritage and luxury.

2. **Booking Process:**
- The user is asked if they want to book a room at the hotel.
- If they agree, they are prompted to input the date of visit
and the number of days they plan to stay.

3. **Room Selection:**
- The user is presented with four types of rooms to choose
from: King Suite, Queen Suite, AC Deluxe, and Non-AC Deluxe.
- A room description (features, size, bed options, etc.) is
displayed for each room.
- The user can select the room they prefer or choose to go
back to the menu if the initial choice doesn't work.
- After selecting the room type, the program simulates
checking for room availability and assigns a room number.

4. **Registration Process:**
- The user is asked to provide their personal information
including name, gender, address, occupation, purpose of visit,
number of rooms booked, and the number of adults and
children.
- They are also asked if they wish to have complimentary
breakfast, with an option to select "yes" or "no".

5. **Billing Calculation:**
- The program calculates the bill based on the room type,
number of days, number of people, and optional breakfast.
- Additional charges may apply based on the number of
adults exceeding the room capacity and the number of
children.
- A tax calculation is performed to include service tax and
VAT.
- The program displays the total gross amount, taxes, and net
amount to be paid.

6. **Payment and Conclusion:**


- The user is prompted to select a payment mode.
- A final thank you message is displayed, completing the
booking process.

HARDWARE USED:
Device name:HP Pavillion Laptop
Processor: AMD Ryzen 5 5500U with Radeon
Graphics - 2.10 GHz
Installed RAM: 16.0 GB (15.3 GB usable)
System type: 64-bit operating system, x64-based
processor

PRINTER:
HP Ink Tank 115
SOFTWARE USED:
BlueJ Version – 5.4.1
Java Version – JDK 23

METHODOLOGY:
Below are the functions used in the
`Hotel_Management` system along with their
explanations:
1. **`main()`**
- **Purpose**: The main entry point of the program.
- **Usage**: It prints a welcome message, initializes the
`Hotel_Management` object, and calls the following methods:
`input()`, `roomBook()`, `registration()`, and `billCalc()`.

2. **`input()`**
- **Purpose**: This method is used to gather basic
information about the customer, such as the date of visit and
the number of days they will stay.
- **Usage**: Asks the user for input regarding the date and
duration of their stay. It then confirms if the customer wants to
proceed with booking a room or exit if they choose 'no'.

3. **`roomBook()`**
- **Purpose**: This method helps the user select the type of
room they prefer and checks for availability.
- **Usage**: Displays room options (King Suite, Queen Suite,
AC Deluxe, Non-AC Deluxe) and invokes the corresponding
room description functions (`RoomDescript.King()`,
`RoomDescript.Queen()`, `RoomDescript.AC()`,
`RoomDescript.Non()`). It checks for room availability based on
bed preference (single or double), and assigns the room to the
customer.

4. **`randomPiller(boolean[] A)`**
- **Purpose**: Initializes the array of room availability status
(true or false) randomly for each type of room.
- **Usage**: The function sets a random availability (`true` or
`false`) for rooms in an array of boolean values for different
room types (King, Queen, AC, Non-AC).

5. **`registration()`**
- **Purpose**: Collects detailed customer information
required for booking and registration.
- **Usage**: It asks for the customer's name, gender,
residential address, occupation, purpose of visit, number of
rooms, number of adults, and children. Additionally, it collects
information about whether the customer wants complimentary
breakfast.

6. **`billCalc()`**
- **Purpose**: This method calculates the bill for the stay
based on room type, number of days, additional charges (like
for adults and children exceeding room capacity), and
complimentary breakfast.
- **Usage**: It calculates the room rate, additional charges,
and generates the final gross amount, tax, and net bill.

7. **`display(double n)`**
- **Purpose**: Displays the final bill details to the customer.
- **Usage**: It prints out a summary of the customer's
booking, including room type, room number, total number of
people, check-in date, total stay duration, gross amount, taxes,
and the net amount. It also asks for the mode of payment.

**Functions in `RoomDescript` Class**

1. **`King()`**
- **Purpose**: Displays the description of the King Suite room
and prompts the user to choose this room type.
- **Usage**: Provides detailed information about the King
Suite, including features and costs. It returns `true` if the
customer chooses the King Suite.

2. **`Queen()`**
- **Purpose**: Displays the description of the Queen Suite
room and prompts the user to choose this room type.
- **Usage**: Provides detailed information about the Queen
Suite, including features and costs. It returns `true` if the
customer chooses the Queen Suite.

3. **`AC()`**
- **Purpose**: Displays the description of the A/C Deluxe
room and prompts the user to choose this room type.
- **Usage**: Provides detailed information about the A/C
Deluxe room, including features and costs. It returns `true` if
the customer chooses the A/C Deluxe room.

4. **`Non()`**
- **Purpose**: Displays the description of the Non-A/C Deluxe
room and prompts the user to choose this room type.
- **Usage**: Provides detailed information about the Non-A/C
Deluxe room, including features and costs. It returns `true` if
the customer chooses the Non-A/C Deluxe room.

LIMITATIONS:
1. **Limited Room Availability Simulation**
- The room availability is randomly determined using the
`randomPiller()` method. However, the program does not
properly check for room availability. The logic in the
`roomBook()` method uses a random approach, but there's no
persistent check to see if a room is truly available across
multiple bookings.
- The current implementation doesn't account for multiple
users trying to book rooms at the same time.

2. **Single User Interaction**


- The program assumes that only one user interacts with the
system at a time, making it unsuitable for multiple customers
booking rooms simultaneously.

3. **Room Selection and Assignment**


- In the `roomBook()` method, the room is assigned based on
a simple loop once a room type is chosen. However, there’s no
actual validation for whether the room is already occupied or
not, which could lead to assigning the same room to multiple
customers.

4. **Room Types and Room Count**


- The code assumes a fixed set of rooms (e.g., `King`,
`Queen`, `AC Deluxe`, `Non-AC Deluxe`) but doesn't
dynamically scale or manage the number of available rooms.
- It also uses `boolean[]` arrays to represent room
availability, which doesn't track specific room numbers, leading
to ambiguity in which specific rooms are available.

5. **No User Authentication**


- There’s no mechanism to verify the identity of users. A user
can easily provide any details, including a false name or
address, leading to potential misuse of the system.

6. **No Data Persistence**


- The program does not save any data after the program is
closed. Once the program ends, all bookings, customer
information, and room availability are lost. This would be
problematic for a real-world application, where data persistence
(in a database or file system) is necessary.
7. **Room Descriptions Not Used Efficiently**
- The room descriptions in the `RoomDescript` class are
printed every time a user selects a room type, even if they are
not relevant to the decision-making process. Once the user
makes a selection, there should be an option to skip the details
if they are not needed.

MINI SOFTWARE PROGRAM:


import java.util.*;
public class Hotel_Management
{
Scanner sc= new Scanner(System.in);
int days,room;
boolean Type[];
String date,name,gen,occp,add,pur,rname;
int adults,child,no;
boolean breakfast;
public static void main()
{
System.out.println(" o o o 8 .oPYo. 8
.oPYo. o ");
System.out.println(" 8 8 8 8 8 8 8
8 8 ");
System.out.println(" 8oooo8 .oPYo. o8P .oPYo. 8
8YooP .oPYo. .oPYo8 Yooo o8P .oPYo. oPYo. ");
System.out.println(" 8 8 8 8 8 8oooo8 8 8 b
8oooo8 8 8 8 8 .oooo8 8 ");
System.out.println(" 8 88 8 8 8 8 8 8 8 8
8 8 8 8 8 B");
System.out.println(" 8 8 YooP 8 Yooo 8 8 8 Yooo
Yoop Yoop8 8 Yoop8 8");

System.out.println(":,,;;;,,;,,,,,::,,,,,:,,:::,,,;;;,,:,,,,,::,,,,,;;;;;.....,,,,,:::,,
,,,;;;;;,,");

System.out.println(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::");

System.out.println(";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;");
System.out.println("");
Hotel_Management ob= new Hotel_Management();
ob.input();
ob.roomBook();
ob.registration();
ob.billCalc();
}
public void input()
{

System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
System.out.println(" 5 Raffles Avenue, Singapore -
0399797");
System.out.println();
System.out.println("Dear customer,");
System.out.println(" A warm welcome to our online
booking site, for the greatest hotel in Singapore,");
System.out.println("built in the year 1987.");
System.out.println("At Hotel Red Star, we bring to you
absolutely modern living in utmost comfort, ");
System.out.println("amidst the fragnance of our glorious
heritage.");
System.out.println();
System.out.println("Be you a native weekend tourist, or be
you an international tourist coming ");
System.out.println("to witness the wonders of Singapore,
be assured that we will take up the ");
System.out.println("responsibility of making your stay a
memorable one.");
System.out.println();
System.out.println("Do you want to book a room in our
grand hotel?");
System.out.println("Please reply in yes or no: ");
if((sc.next()).equalsIgnoreCase("yes"))
{
System.out.println();
System.out.println("Please state your date of visit, and
the number of days you intend to stay");
System.out.println("Date: ");
date= sc.next();
System.out.print("Number of days: ");
days= sc.nextInt();
}
else
System.exit(0);
}

public void roomBook()


{
boolean King[]= new boolean[5];
boolean Queen[]= new boolean[5];
boolean AC[]= new boolean[15];
boolean Non[]= new boolean[15];
King=randomPiller(King);
Queen=randomPiller(Queen);
AC=randomPiller(AC);
Non=randomPiller(Non);
int f1=0;
while(f1==0)
{
System.out.println("Please select the type of room you
prefer.");
System.out.println("1. King Suite");
System.out.println("2. Queen Suite");
System.out.println("3. AC Deluxe");
System.out.println("4. Non-AC Deluxe");
System.out.print("Enter your choice to view: ");
int ch= sc.nextInt();
boolean tmp;
switch(ch)
{
case 1: tmp=RoomDescript.King();
if(tmp)
{
Type= King;
rname="King Suite"; f1=1;
}
break;
case 2: tmp=RoomDescript.Queen();
if(tmp)
{
Type= Queen;
rname="Queen Suite"; f1=1;
}
break;
case 3: tmp=RoomDescript.AC();
if(tmp)
{
Type= AC;
rname="AC Deluxe"; f1=1;
}
break;
case 4: tmp=RoomDescript.Non();
if(tmp)
{
Type= Non;
rname="Non-AC Deluxe"; f1=1;
}
break;
default: System.out.println("INPUT IS INVALID!!!
PLEASE RE-ENTER YOUR CHOICE. ");
roomBook();
}
}
String bed="double";
if(rname.equals("AC Deluxe") || rname.equals("Non-AC
Deluxe"))
{
System.out.println("Single bed or double bed? ");
bed=sc.next();
}
System.out.println("Checking for room-availability.........");
for(long i=0; i<1599999999; i++);
System.out.println("DONE!");
int cn;
System.out.println("Room available= ");
for(int i=0; i<Type.length; i++)
{
if(bed.equalsIgnoreCase("single"))
{
if(Type[i]==true && i<=(Type.length/2))
{
System.out.println("Room "+(i+1));
room=i;
}
}
else if(bed.equalsIgnoreCase("double"))
{
if(Type[i]==true&&i>(Type.length/2))
{
System.out.println("Room "+(i+1));
room=i;
}
}
}
System.out.println("We have assigned room "+
(room+1)+" for you");
System.out.println("Let us now proceed to the
registration");
}

public boolean[] randomPiller(boolean A[])


{
for(int i=0; i<A.length; i++)
{
int rand= (int)(Math.random()+0.5);
if(rand==1)
A[i]=true;
else if(rand==0)
A[i]=false;
}
return A;
}

void registration()
{
String n1,n2;
System.out.println();
System.out.println("_");
System.out.println(" REGISTRATION ");
System.out.println(" '''''''''''''''''''''''''''");
System.out.println("_");
System.out.println(" ");
System.out.println("Name: ");
n1=sc.next(); n2=sc.nextLine(); name=n1+' '+n2;
System.out.print("Gender: ");
gen=sc.next();
System.out.println("Residential Address: ");
n1=sc.next(); n2=sc.nextLine();add=n1+' '+n2;
System.out.println("Occupation: ");
n1=sc.next(); n2=sc.nextLine();occp=n1+' '+n2;
System.out.print("Purpose of visit: ");
n1=sc.next(); n2=sc.nextLine();pur=n1+' '+n2;
System.out.println("Number of rooms booked: ");
no=sc.nextInt();
System.out.print("Total number of adults: ");
adults=sc.nextInt();
System.out.print("Total number of children(below 18): ");
child=sc.nextInt();
System.out.println("THANK YOU!!!");
System.out.println("Do you wish to have complementary
breakfast(yes/no)? ");
String bk=sc.next();
breakfast=bk.equalsIgnoreCase("yes");
}

public void billCalc()


{
int rate=0;
if(rname.equals("King Suite"))
rate=8000;
else if(rname.equals("Queen Suite"))
rate=5000;
else if(rname.equals("AC Deluxe"))
rate=3000;
else if(rname.equals("Non-AC Deluxe"))
rate=2500;
int add=0,rent=rate*days;
if(adults>(no*2))
add=200*days;
if(child>(no))
add+=100*days;
if(breakfast)
{
add+=days*(adults+child)*200;
}
int gross=rent+add;
display(gross);
}

void display(double n)
{
System.out.println();
System.out.println(" HOTEL RED STAR
");
System.out.println(" ^^^^^^^^^^^^^^^^
");
System.out.println();
System.out.println("Room type: "+rname);
System.out.println("Room number= "+room);
System.out.println("Customer Name: "+name);
System.out.println("Total number of people= "+
(adults+child));
System.out.println("Date of check-in: "+date);
System.out.println("Days stayed= "+days);
System.out.println();
System.out.println("Gross amount= "+n);
double servetax=(5.0/100)*n;
double vat=(14.5/100)*(servetax+n);
double bill=servetax+vat+n;
System.out.println("Taxes= "+vat);
System.out.println("Net amount= "+bill);
System.out.println();
System.out.println("Please enter mode of payment: ");
String mode=sc.next();
System.out.println("THANK YOU!!");
}
}
class RoomDescript
{
/**
* Will contain the descriptions of the rooms. When the user
inputs his choice, a description will be available,
* which will be accessible through this class.
*/
static Scanner sc=new Scanner(System.in);
static boolean King()
{
boolean a=false;
System.out.println("KING SUITE");
System.out.println("");
System.out.println("The King Suite is for the very best of
our guests. With the world class ");
System.out.println("features, and excellent room decor,
this suite is nothing short of ");
System.out.println("perfection, which i desired by many.
The room is spacy, and the ");
System.out.println("cosiness of it makes one feel at home,
albeit a more comfortable and ");
System.out.println("more exquisite one. We assure you,
that if this shall be your choice, you ");
System.out.println("shall regret the day of your
departure.");
System.out.println("");
System.out.println("Features");
System.out.println("^^^^^^^^^^^^");
System.out.println("");
System.out.println("> 350X200 ft.room,large,spacy and
comfortable");
System.out.println("> A gigantic Double-bed.with
Specktron-tehnology custom made ");
System.out.println(" mattress, for a good night's sleep");
System.out.println("> Air-conditioned, with two split A/Cs.
");
System.out.println("> A 42 inch LG Smart TV");
System.out.println("> Two large sofas, a bedside table,
and a coffee table");
System.out.println("> A long balcony, with a stunning view
of the Marina Bay Sands, as well as the ");
System.out.println(" rest of Singapore");
System.out.println("> A mini-bar, with an assortment of
the finest elixirs of Singapore");
System.out.println("> A huge bathroom, fit for a king.");
System.out.println("");
System.out.println("The cost for this room(exclusive of
taxes) is = Rs.8000/day");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Do you want to choose this type?");
System.out.println("Enter 'yes' to book or 'no' to go back
to the menu: ");
if(sc.nextLine().equalsIgnoreCase("yes"))
a=true;
System.out.println("");
return a;
}

static boolean Queen()


{
boolean a=false;
System.out.println("QUEEN SUITE");
System.out.println("");
System.out.println("The Queen Suite has an extra touch of
comfort. The features available ");
System.out.println("are generally associated with cosy
lifestyle. The rooms are such made ");
System.out.println("that we assure you that you shall have
no problem in blending in with ");
System.out.println("the feel of it. The atmosphere created
by this room is a calm and ");
System.out.println("peaceful one, in contrast to the
loudness pf the King suite. If a quiet ");
System.out.println("stay is what you desire, we take
pleasure welcoming you to the ");
System.out.println("grandeur of this room.");
System.out.println("");
System.out.println("Features");
System.out.println("^^^^^^^^^^");
System.out.println("");
System.out.println("> 320X220 ft. room, cosy with a
home-made feel.");
System.out.println("A perfectly home-like double bed, with
a plush Kamarov protocol ");
System.out.println(" custom made mattress.");
System.out.println("> Air-conditioned, with a split A/C and
a bedside A/C.");
System.out.println("A 42 inch LG Smart TV");
System.out.println("> Two large sofas, two bedside
tables.");
System.out.println("> A round balcony, with a spectacular
view of Singapore.");
System.out.println("> A wine counter, with vintage wines
of Korea");
System.out.println("> A cosy, marble-and-graphite
bathroom");
System.out.println("");
System.out.println("The cost for this room(exclusive of
taxes) is = Rs.5500/day");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Do you want to choose this type?");
System.out.println("Enter 'yes' to book, or 'no' to go back
to the the menu: ");
if(sc.nextLine().equalsIgnoreCase("yes"))
a=true;
System.out.println("");
return(a);
}

static boolean AC()


{
boolean a=false;
System.out.println("A/C Deluxe");
System.out.println("");
System.out.println("The A/C Deluxe is the standard room
for our hotel. With an affordable ");
System.out.println("price, and unbelievable comfort, the
rooms will exceed your ");
System.out.println("expectations. The ambience is a very
tourist-friendly one, and the room ");
System.out.println("will surely make your stay at Hotel Red
Star, a very memorable one.");
System.out.println("");
System.out.println("Features");
System.out.println("^^^^^^^^^");
System.out.println("");
System.out.println("> 200X150 ft. room, fully air
conditioned.");
System.out.println("> Choice of single or double bed, with
a soft, comfortable mattress.");
System.out.println("> 32 inch LG LED TV");
System.out.println("> A large sofa, centre table, bedside
table");
System.out.println("> A balcony, with a spectacular view
of Progyang");
System.out.println("> A well-furnished bathroom.");
System.out.println("");
System.out.println("The cost for this room (exclusive of
taxes) is = Rs.3000/day");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Do you want to choose this type?");
System.out.println("Enter 'yes' to book or 'no' to go back
to the menu: ");
if(sc.nextLine().equalsIgnoreCase("yes"))
a=true;
System.out.println("");
return a;
}

static boolean Non()


{
boolean a=false;
System.out.println("Non A/C Deluxe");
System.out.println("");
System.out.println("Don't like canned air? Feeling natural?
Don't worry! Hotel Red Star ");
System.out.println("offers you a special Non A/C Deluxe
suite with open windows to enjoy ");
System.out.println("the scenic beauty of Singapore. The
air here is as fresh as it can be, and the ");
System.out.println("natural way of life will surely make you
feel like a part of Korea.");
System.out.println("");
System.out.println("Featues");
System.out.println("^^^^^^^^^");
System.out.println("");
System.out.println("> 150X150 ft. room.");
System.out.println("> Four large open-able windows");
System.out.println("> Choice of single or double bed, with
a soft, comfortable mattress.");
System.out.println("> A 32 inch LG LED TV");
System.out.println("> A large sofa, centre table, bedside
table");
System.out.println("> A balcony, with a spectacular view
of Progyang");
System.out.println("> A well-furnished bathroom.");
System.out.println("");
System.out.println("The cost for the this room (exclusive
of taxes) is = Rs.2500/day");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Do you want to choose this type?");
System.out.println("Enter 'yes' or 'no' to go back to the
menu: ");
if(sc.nextLine().equalsIgnoreCase("yes"))
a=true;
System.out.println("");
return a;
}
}

OUTPUT:

You might also like