0% found this document useful (0 votes)
48 views15 pages

Hotel Booking Project CPP

The document is a project file for an online hotel booking website developed in C++ as part of the Computer Science curriculum at Oil India Higher Secondary School. It includes an introduction, objectives, system design, source code, expected output, conclusion, advantages and limitations, and a bibliography. The project demonstrates core object-oriented programming concepts and allows users to book and view hotel room bookings through a console interface.
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)
48 views15 pages

Hotel Booking Project CPP

The document is a project file for an online hotel booking website developed in C++ as part of the Computer Science curriculum at Oil India Higher Secondary School. It includes an introduction, objectives, system design, source code, expected output, conclusion, advantages and limitations, and a bibliography. The project demonstrates core object-oriented programming concepts and allows users to book and view hotel room bookings through a console interface.
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/ 15

OIL INDIA HIGHER SECONDARY SCHOOL

Duliajan, Assam - 786602

A partial dissertation submitted for the fulfilment of

COMPUTER SCIENCE AND APPLICATION

PROJECT FILE FOR

Assam State School Education Board Division (II)

Session: 2025 – 2026

ONLINE HOTEL BOOKING WEBSITE

An Object Oriented Programming in C+


+

Submitted To Submitted by
PLABITA KAKOTY NAME
Faculty (Computer Science) ROLL NO: ______
Oil India H.S School Oil India H.S School
Duliajan, Assam – 786602 Duliajan, Assam – 786602
CERTIFICATE
This is to certify that the project entitled “Online Hotel Booking Website” submitted by
NAME in partial fulfilment of the requirement of the award of Computer Science and
Application of Oil India Higher Secondary School, Duliajan has been carried out under
guidance of CSCA faculty PLABITA KAKOTY during the academic year 2025-2026.

___________________ _____________________
Internal Examiner Tarun Kumar Singh
Faculty (CSCA) Principal
O.I.H.S.S, Duliajan O.I.H.S.S, Duliajan

_________________
External Examiner
DECLARATION
I hereby declare that the project titled “Online Hotel Booking Website”, submitted for the
award of H.S. 2nd Year in Computer Science and Application at Oil India Higher
Secondary School, Duliajan, through the faculty of Computer Science and Application,
during the academic session 2025–2026, is my original work.
ACKNOWLEDGEMENT
I present this project on 'Online Hotel Booking Website' with great pleasure and
satisfaction. I give special thanks to my project guide PLABITA KAKOTY who
extended every possible help at each and every stage of the project. I also thank our
Principal TARUN KUMAR SINGH for providing all necessary facilities like lab access,
books, etc. Lastly, I thank all my friends and classmates for their support.
INDEX
1. Introduction

2. Objective

3. System Design

4. Source Code

5. Output

6. Conclusion

7. Advantages and Limitations

8. Bibliography
1. INTRODUCTION
This C++ project simulates a simple online hotel booking system using Object Oriented
Programming concepts. Users can book rooms and view existing bookings through a
console interface. The program is developed in C++ and demonstrates core OOP
concepts such as classes, objects, and encapsulation.
2. OBJECTIVE
- To create a simple and user-friendly hotel booking system using C++.
- To demonstrate the practical use of classes, objects, and data encapsulation.
- To allow booking, storing, and viewing of hotel room records.
3. SYSTEM DESIGN
The system contains two main classes: Hotel and Booking.

- The Hotel class stores all bookings and provides interfaces to book a room and view all
bookings.
- The Booking class stores customer details, check-in and check-out dates, and room
number.

Basic Flow:
1. User selects an option from the menu.
2. Books a room with required details.
3. System assigns room and stores info.
4. User can view all bookings.
4. SOURCE CODE
#include <iostream>

#include <string>

#include <vector>

using namespace std;

class Booking {

public:

string customerName, checkInDate, checkOutDate;

int roomNumber;

Booking(string name, string in, string out, int room)

: customerName(name), checkInDate(in), checkOutDate(out), roomNumber(room)


{}

void display() {

cout << "Customer: " << customerName << endl;

cout << "Room No: " << roomNumber << endl;

cout << "Check-In: " << checkInDate << " | Check-Out: " << checkOutDate <<
endl;

cout << "---------------------------------------" << endl;

};

class Hotel {

vector<Booking> bookings;
int totalRooms;

public:

Hotel(int rooms) : totalRooms(rooms) {}

void bookRoom() {

if (bookings.size() >= totalRooms) {

cout << "Sorry! No rooms available.\n"; return; }

string name, inDate, outDate;

int roomNo = bookings.size() + 1;

cout << "Enter your name: "; cin.ignore(); getline(cin, name);

cout << "Enter check-in date (DD-MM-YYYY): "; getline(cin, inDate);

cout << "Enter check-out date (DD-MM-YYYY): "; getline(cin, outDate);

bookings.push_back(Booking(name, inDate, outDate, roomNo));

cout << "Room " << roomNo << " booked successfully!\n";

void viewBookings() {

if (bookings.empty()) { cout << "No bookings found.\n"; return; }

for (auto &b : bookings) b.display();

};

int main() {

Hotel h(5); int choice;


while (true) {

cout << "\n--- Hotel Booking System ---\n";

cout << "1. Book a Room\n2. View All Bookings\n3. Exit\nEnter your choice: ";

cin >> choice;

switch (choice) {

case 1: h.bookRoom(); break;

case 2: h.viewBookings(); break;

case 3: cout << "Thank you!\n"; return 0;

default: cout << "Invalid choice!\n";

}
5. OUTPUT (Expected)
Sample Output:

--- Hotel Booking System ---


1. Book a Room
2. View All Bookings
3. Exit
Enter your choice: 1
Enter your name: John Doe
Enter check-in date (DD-MM-YYYY): 10-07-2025
Enter check-out date (DD-MM-YYYY): 12-07-2025
Room 1 booked successfully!
6. CONCLUSION
This project demonstrates a basic hotel booking system in C++ using object-oriented
programming concepts. It provides simple room booking and display functionalities
through a console interface.
7. ADVANTAGES AND LIMITATIONS
Advantages:
- Simple and easy to use
- Demonstrates core OOP concepts
- Useful for beginner C++ learners

Limitations:
- No file/database storage
- Limited features (no admin panel, no user login)
- Console-only interface
8. BIBLIOGRAPHY
- C++ Programming by E. Balagurusamy
- TutorialsPoint.com
- GeeksForGeeks.org
- StackOverflow
- Class Notes

You might also like