100% found this document useful (1 vote)
18K views

Hotel Management System: A Project Report Bachelor of Science (Information Technology) by Chirag Sudhakar Kamble

This document describes a hotel management system project built using Python. The project aims to automate key functions of hotel management like room management, customer check-in/check-out, and bill generation. It allows both online users to view information and administrators to manage hotel records and update information. The system is intended to simplify and computerize daily hotel activities while improving user friendliness, connectivity, security, and reliability compared to a manual system. It incorporates modules for room booking, customer admission, room assignment, checkout, and billing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
18K views

Hotel Management System: A Project Report Bachelor of Science (Information Technology) by Chirag Sudhakar Kamble

This document describes a hotel management system project built using Python. The project aims to automate key functions of hotel management like room management, customer check-in/check-out, and bill generation. It allows both online users to view information and administrators to manage hotel records and update information. The system is intended to simplify and computerize daily hotel activities while improving user friendliness, connectivity, security, and reliability compared to a manual system. It incorporates modules for room booking, customer admission, room assignment, checkout, and billing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 70

HOTEL MANAGEMENT SYSTEM USING PYTHON

HOTEL MANAGEMENT SYSTEM

A Project Report
Submitted in partial fulfilment of the
Requirements for the award of the degree of
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY) BY

CHIRAG SUDHAKAR KAMBLE

Under the esteemed guidance of


Prof. Ms. Preeti Sarode Assistant
Professor

DEPARTMENT OF INFORMATION TECHNOLOGY


K.M. AGRAWAL COLLEGE (Affiliated to
the University of Mumbai) KALYAN,
PINCODE:- 421301
MAHARASHTRA 2021-
2022

1
HOTEL MANAGEMENT SYSTEM USING PYTHON

PROFORMA FOR THE APPROVAL PROJECT PROPOSAL

PRN NO:- 2019016401119052 Roll No:- 34

• Name of the student


CHIRAG SUDHAKAR KAMBLE

• Title of the project

HOTEL MANAGEMENT SYSTEM

• Name of the Guide

Prof. Ms. Preeti Sarode

• Teaching experience of the guide

• Is this your first submission? YES NO

Signature of the student Signature of the guide

Date: ------------- Date: -----------------

2
HOTEL MANAGEMENT SYSTEM USING PYTHON

K.M. AGRAWAL COLLEGE


(Affiliated to the University of Mumbai)
KALYAN, PINCODE:- 421301 MAHARASHTRA

DEPARTMENT OF INFORMATION TECHNOLOGY

NACC ACCREDITED B++


CERTIFICATE

This is to certify that the project entitled, “HOTEL MANAGEMENT SYSTEM”, is bonafied
work of CHIRAG SUDHAKAR KAMBLE bearing Seat No: submitted in partial fulfilment
of the requirements for the award of BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY
from University Of Mumbai.

Internal Guide Principal

External Examiner

Date: College Seal

3
HOTEL MANAGEMENT SYSTEM USING PYTHON

ACKNOWLEDGEMENT

We have to express our thanks unreserved by towards Ms. PREETI

SARODE for the expert and valuable guidance lent to us in completing

this project work assigned to us. The tips provided by them stood us to

good stead in accomplishing our work to the best of level form our side.

Our heart goes out with deep gratitude to them, for the perennial patronage

in our studies and especially this project work. We are sure to be largely

helped by the experience of the project worked in the time to come.

4
HOTEL MANAGEMENT SYSTEM USING PYTHON

PREFACE

 Computer Programming is an art. It is a way of explaining how a specific task is to be performed by


a given computer driven by speedy development in the underlying hardware, compile programs have
become considerably complex and bigger.

 Contrary to popular belief computer programming can be both fun and an excellent opportunity to
exercise your mind, creativity and imagination. It gives us the power to instruct computers according
to our will. With highly powerful work horses at disposal, there is no limit to what we can do with the
help of programming languages. The only limit being our own imagination.

 Computer programming is that art which creates an artist in you and increase the capability of
imagination…

 We again convey our thanks to MS. PREETI SARODE for their great guidance and precious time
without this it is impossible for us to complete the project.

5
HOTEL MANAGEMENT SYSTEM USING PYTHON

Contents

 Introduction

 Objectives
 Scope
 H/W & S/W Requirements
 System Development life cycle(SDLC)
 Phases of SDL
 Project category.
 Analysis (DFDs, ER Diagrams, Class Diagrams etc.)
 Coding
 Screens(forms)
 Implementation & testing
 A complete structure which includes :
(i) Number of modules and their description to provide an estimation of the student’s effort on the project .

(ii) Data Structures as per the project requirements for all the modules.

(iii) Process Logic of each module.

(iv) Report generation.

 Security and Validation Checks..

 Conclusions

 Bibliography

6
HOTEL MANAGEMENT SYSTEM USING PYTHON

HOTEL MANAGEMENT SYSTEM

INTRODUCTION

This project is aimed at developing a system that is an easy to operate user friendly,economically priced
software that commited to meet the all requirements to manage small,medium and big scale hotels..I have tried
my best to make the complicated process of Hotel Management System as simple
as possible using Structured & Modular technique & Menu oriented interface. I have tried
to design the software in such a way that user may not have any difficulty in using this
package & further expansion is possible without much effort. Even though I cannot claim
that this work to be entirely exhaustive, the main purpose of my exercise is perform each
Employee’s activity in computerized way rather than manually which is time consuming.
7
I am confident that this software package can be readily used by non-programming
personal avoiding human handled chance of error. This project is used by two types of
users
HOTEL MANAGEMENT SYSTEM USING PYTHON
i. Online Users.
ii. Administrator (management of the Hotel).
Online users can see the required articles or news

Administrator can maintain daily updates in the hotel records. Administrator is must be
an authorized user. He can further change the password. There is the facility for password
recovery, logout etc.
The main aim of the entire activity is to automate the process of day to day activities of
Hotel like Room activities, Admission of a New Customer, Assign a room according to
customer’s demand, checkout of a computer and releasing the room and finally compute
the bill etc.
The limited time and resources have restricted us to incorporate, in this project, only a
main activities that are performed in a HOTEL Management System, but utmost care has
been taken to make the system efficient and user friendly. “HOTEL Management
System” has been designed to computerized the following functions that are performed
by the system:
Room Detail Functions
Opening a New Room
Modification to room assigned
Check-in and check-out Detail Functions
Admission of New customer
Check-out of customer
Room assigning related to customer’s need.
Statement of Customer Details
Check-in customer
Check-out customer
Room Details
Total number of Customers in the Hotel
Individual customer Report
OBJECTIVE
During the past several decades personnel function has been transformed from a
relatively obscure record keeping staff to central and top level management function.
There are many factors that have influenced this transformation like technological
advances, professionalism, and general recognition of human beings as most important
8
resources.
A computer based management system is designed to handle all the primary
information required to calculate monthly statements. Separate database is
HOTEL MANAGEMENT SYSTEM USING PYTHON
maintained to handle all the details required for the correct statement calculation
and generation.
This project intends to introduce more user friendliness in the various activities
such as record updation, maintenance, and searching.

The searching of record has been made quite simple as all the details of the
customer can be obtained by simply keying in the identification of that customer.
Similarly, record maintenance and updation can also be accomplished by using
the identification of the customer with all the details being automatically
generated. These details are also being promptly automatically updated in the
master file thus keeping the record absolutely up-to-date.
The entire information has maintained in the database or Files and whoever wants
to retrieve can’t retrieve, only authorization user can retrieve the necessary
information which can be easily be accessible from the file.
The main objective of the entire activity is to automate the process of day to day
activities of Hotel like:
1. Room activities,
2. Admission of a New Customer,
3. Assign a room according to customer’s demand,
4. Checkout of a computer and releasing the room
5. Finally compute the bill etc.
6. Packages available.
7. Advance online bookings.
8. Online Cancellation.
9. List of Regular customers.
10. Email facility.
11. Feedbacks
This project have some more features:
System Connectivity
No data duplication
No Paper Work Required
Time Efficient
Cost Efficient
Automatic data validation
9
User friendly environment
Data security and reliability
Fast data insertion & retrieval
HOTEL MANAGEMENT SYSTEM USING PYTHON
Easy performance check

SCOPE
I have designed the given proposed system in the JSP to automate the process of Hotels.
This project is useful for the authorities which keep track of all the users registered in a
particular state .The authority can add hotel packages, room details, availability of rooms,
online booking etc.
The following steps that give the detailed information of the need of proposed system are:
Performance: During past several decades, the records are supposed to be manually
handled for all activities. The manual handling of the record is time consuming and
highly prone to error. To improve the performance of the Hotel Management System, the
computerized system is to be undertaken. This project is fully computerized and user
friendly even that any of the members can see the report and status of the company.
Efficiency: The basic need of this website is efficiency. The website should be efficient
so that whenever a new user submits his/her details the website is updated automatically.
This record will be useful for other users instantly.
Control: The complete control of the project is under the hands of authorized person who
has the password to access this project and illegal access is not supposed to deal with. All
the control is under the administrator and the other members have the rights to just see
the records not to change any transaction or entry.
Security: Security is the main criteria for the proposed system. Since illegal access may corrupt the database.
So security has to be given in this project.
Scope of Future Application
This project can be used in the hotel after adding some more useful modules in the
project for which hotel are providing services.
Utmost care and back-up procedures must be established to ensure 100% successful
implementation of the computerized hotel system. In case of system failure, the
organization should be in a position to process the transaction with another organization
or if the worst comes to the worst, it should be in a position to complete it manually.
Scope of Improvement
1
0 this project can also be improved
Now a days hotel are providing many other facilities,
with the improvement in the Hotels.
Utmost care and back-up procedures must be established to ensure 100% successful
HOTEL MANAGEMENT SYSTEM USING PYTHON
implementation of the computerized banking system. In case of system failure, the
organization should be in a position to process the transaction with another organization
or if the worst comes to the worst, it should be in a position to complete it manually.

SOFTWARE & HARDWARE REQIREMENT:

I used TURBO C and Windows XP with using Microsoft World to develop this software. So I have tested this
on the above configuration. But it can be run on any system which contains following requirements.

Minimum Software Requirements:

1. Windows 98 or Higher (Windows XP or 2000).


2.turbo c.
3. MicroSoft Office Picture Editor.

Minimum Hardware Requirements:

1. 3MB free Space on Harddisk (for Software)

2. Mouse & Keyboard (For Software Instruction)

3. CD-Rom or Any Installation Media

4. VGA or SVGA for Graphics

SYSTEM DEVELOPMENT LIFE CYCLE

The systems development life cycle is a project management technique that divides complex projects

into smaller, more easily managed segments or phases. Segmenting projects allows managers to verify the

successful completion of project phases before allocating resource to subsequent phases. Software
1
development projects typically include initiation, 1planning, design, development, testing, implementation, and

maintenance phases. However, the phases may be divided differently depending on the organization involved.

For example, initial project activities might be designated as request, requirements-definition, and planning
HOTEL MANAGEMENT SYSTEM USING PYTHON
phases, or initiation, concept-development, and planning phases. End users of the system under development

should be involved in reviewing the output of each phase to ensure the system is being built phase to ensure the

system is being built to deliver the needed functionality.

1
2
HOTEL MANAGEMENT SYSTEM USING PYTHON

Phases Of System Development Life Cycle

Initiation Phase

The Initiation Phase begins when a business sponsor identifies a need or an opportunity. The purpose of the
Initiation Phase is to:
1>Identify and validate an opportunity to improve business accomplishments of the organization or a
deficiency related to a business need.

2>Identify significant assumptions and constraints on solutions to that need.


3>Recommend the exploration of alternative concepts and methods to satisfy the need including
questioning the need for technology, i.e., will a change in the business process offer a solution?
4>Assure executive business and executive technical sponsorship.

The Sponsor designates a Project Manager and the business need is documented in a Concept Proposal.

The Concept Proposal includes information about the business process and the relationship to the
Agency/Organization Infrastructure and the Strategic Plan.

A successful Concept Proposal results in a Project Management Charter which outlines the authority of the
project manager to begin the project.

Careful oversight is required to ensure projects support strategic business objectives and resources are
effectively implemented into an organization's enterprise architecture. The initiation phase begins when an
opportunity to add, improve, or correct a system is identified and formally requested through the presentation
of a business case. The business case should, at a minimum, describe a proposal’s purpose, identify expected
benefits, and explain how the proposed system supports one of the organization’s business strategies.

1
The business case should also identify alternative3 solutions and detail as many informational, functional, and
network requirements as possible.
System Concept Development Phase
HOTEL MANAGEMENT SYSTEM USING PYTHON

The System Concept Development Phase begins after a business need or opportunity is validated by the
Agency/Organization Program Leadership and the Agency/Organization CIO.
The purpose of the System Concept Development Phase is to:
1>Determine the feasibility and appropriateness of the alternatives.
2>Identify system interfaces.

3>Identify basic functional and data requirements to satisfy the business need. Establish system boundaries,
identify goals, objectives, critical success factors, and performance measures.
4>Evaluate costs and benefits of alternative approaches to satisfy the basic functional requirements .
5>Assess project risks.
6>Identify and initiate risk mitigation actions, and
7>Develop high-level technical architecture, process models, data models, and a concept of operations.
This phase explores potential ,technical solutions within the context of the business need.
It may include several trade-off decisions such as the decision to use COTS software products as opposed to
developing custom software or reusing software components, or the decision to use an incremental delivery
versus a complete, one- time deployment. Construction of executable prototypes is encouraged to evaluate
technology to support the business process.
The System Boundary Document serves as an important reference document to support the Information
Technology Project Request (ITPR) process. The ITPR must be approved by the

State CIO before the project can move forward.

1
4
HOTEL MANAGEMENT SYSTEM USING PYTHON

Planning Phase

The planning phase is the most critical step in completing development, acquisition, and maintenance projects.
1
5 a project, is necessary to coordinate activities and manage
Careful planning, particularly in the early stages of
project risks effectively. The depth and formality of project plans should be commensurate with the
characteristics and risks of a given project.
HOTEL MANAGEMENT SYSTEM USING PYTHON

Project plans refine the information gathered during the initiation phase by further identifying the specific
activities and resources required to complete a project. A critical part of a project manager’s job is to
coordinate discussions between user, audit, security, design, development, and network personnel to identify
and document as many functional, security, and network
requirements as possible.
During this phase, a plan is developed that documents the approach to be used and includes a discussion of
methods, tools, tasks, resources, project schedules, and user input.
Personnel assignments, costs, project schedule, and target dates are established.
A Project Management Plan is created with components related to acquisition planning, configuration
management planning, quality assurance
planning, concept of operations, system security, verification and validation and systems engineering
management planning.

Requirements Analysis Phase

This phase formally defines the detailed functional user requirements using high-level requirements identified
in the Initiation, System Concept, and Planning phases. It also delineates the requirements in terms of data,
system
performance, security, and maintainability requirements for the system. The requirements are defined in this
phase to a level of detail sufficient for systems design to proceed.
They need to be measurable, testable, and relate to the business need or opportunity identified in the Initiation
1
Phase. The requirements that will be used to determine acceptance of the system are captured in the Test and
6
Evaluation Master Plan. The purposes of this phase are to:
1>Further define and refine the functional
HOTEL MANAGEMENT SYSTEM USING PYTHON
and data requirements and document them
in the Requirements Document,

2>Complete business process reengineering of the functions to be supported (i.e., verify what information
drives the business process, what information is generated,
who generates it, where does the information go, and who processes it),
3>Develop detailed data and process models (system inputs, outputs, and the process.
4>Develop the test and evaluation requirements that will be used to determine acceptable system
performance.

Design Phase

The design phase involves converting the informational, functional, and network requirements identified
during the initiation and planning phases into unified design specifications that developers use to script
programs during the development phase. Program designs are c onstructed in various ways. Using a top-down
approach, designers first identify and link major program components and interfaces, then expand design
layouts as they identify and link smaller subsystems and connections. Using a bottom-up approach, designers
first identify and link minor program components and interfaces, then expand design layouts as they identify
and link larger systems and connections.
Contemporary design techniques often use prototyping tools that build mock-up designs of items such as
application screens, database layouts, and system architectures. End users, designers, developers, database
managers, and network administrators should review and refine the prototyped designs in an iterative process
until they agree on an acceptable design. Audit, security, and quality assurance personnel should be involved in
the review and approval process.
During this phase, the system is designed to satisfy the functional requirements identified in the previous
phase. Since problems in the design phase could be very expensive to solve in the later stage of the software
development, a variety of elements are considered in the design to mitigate risk. These include:
1 > Identifying potential risks and defining design features.
2 > Performing a security risk assessment.
3 > Developing a conversion plan to migrate current data to the new system.
4 > Determining the operating environment.
5 > Defining major subsystems and their inputs and outputs.
6 > Allocating processes to resources.
7 > Preparing detailed logic specifications for
each software module.
1
7 which captures the preliminary design for the system.
The result is a draft System Design Document
Everything requiring user input or approval is documented and reviewed by the user.
HOTEL MANAGEMENT SYSTEM USING PYTHON
Once these documents have been approved by the Agency CIO and Business Sponsor, the final System Design
Document is created to serve as the Critical/Detailed Design for the system. This document receives a rigorous
review by Agency technical and functional representatives to ensure that it satisfies the business requirements.

Concurrent with the development of the system design, the Agency Project Manager begins development of
the Implementation Plan, Operations and Maintenance Manual, and the Training Plan.

Development Phase
The development phase involves converting design specifications
into executable programs. Effective development standards include requirements that programmers and other
project participants discuss design specifications before programming begins. The procedures help ensure
programmers clearly understand program designs and functional requirements.
Programmers use various techniques to develop computer programs. The large
transaction-oriented programs associated with financial institutions have traditionally been developed using
procedural programming
techniques.
Procedural programming involves the line-by-line scripting of logical instructions that are combined to form a
program.
Effective completion of the previous stages is a key factor in the success of the Development phase. The
Development phase consists of:
1>Translating the detailed requirements and
design into system components.
2>Testing individual elements (units) for
usability.
3>Preparing for integration and testing of the IT system.

PROJECT CATEGORY
This Project is coupled with material on how to use the various tool, subsets available in

JSP, SERVLETS AND MY SQL.

The need of today’s software development is competence in a GUI based front-end tool,

which can connect to Relational Database engines. This gives the programmer the

1
opportunity to develop client server based commercial applications.
8
These applications give users the power and ease of a GUI with the multi user

capabilities of Novell, UNIX or WinNT based RDBMS engines such as MY SQL .


HOTEL MANAGEMENT SYSTEM USING PYTHON
All the important coding techniques used by programmers, in OOPS based coding is

brought out in full and in great detail.

System Study & Analysis


PRINCIPLES OF SYSTEM ANALYSIS
1. Understand the problem before you begin to create the analysis model.

2. Develop prototypes that enable a user to understand how human machine interaction

will occur.

3. Record the origin of and the reason for every requirement.

4. Use multiple views of requirements like building data, function and behavioral models.

5. Work to eliminate ambiguity.

ENTITY RELATIONSHIP DIAGRAM (ERD)


Entity – Relationship Diagram: This depicts relationship between data objects.

The attribute of each data objects noted in the entity- relationship diagram can be

described using a data object description. Data flow diagram serves two

purposes:

1. To provide an indication of how data are transformed as they move through

the system.

2. To depict the functions that transformation the data flow.

Data Objects: A data object is a representation of almost any composite

information that must be understood by the software. By composite information,

we mean something that has a number of different properties or attributes. A

data object encapsulates data only there is no reference within a data object to

operations that act on the data.

1 object and take on one of


Attributes: Attributes define the properties of a data
9
three different characteristics. They can be used to:

Name an instance of data object.


HOTEL MANAGEMENT SYSTEM USING PYTHON

Describe the instance.

Make reference to another instance in other table.

Relationships: Data objects are connected to one another in a variety of

different ways. We can define a set of object relationship pairs that define the

2
0
r

elevant relationships.
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
1
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
2
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
3
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
4
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
5
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
6
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
7
HOTEL MANAGEMENT SYSTEM USING PYTHON

Screens

2
8
HOTEL MANAGEMENT SYSTEM USING PYTHON

2
9
HOTEL MANAGEMENT SYSTEM USING PYTHON

3
0
HOTEL MANAGEMENT SYSTEM USING PYTHON

CODING:

clrscr() ;

int valid ;

char ch ;

char t_rcode[5] ;

int t_roomno , tr ;

char t_status ;

float t_tariff ;

gotoxy(1,3) ;

cout<<"Enter the Room no. to be modified " ;

cin>>tr ;

getch();
3
if ( room_found( tr )!=1 ) 1

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. NOT FOUND" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

return ;

display_record(tr) ;

gotoxy(1,10) ;

cout<<"Do you want to modify this Room Record (y/n) : " ;

do

valid = 1 ;

gotoxy(48,10) ;

cin>>ch;

getch() ;

ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')

valid = 0 ;

gotoxy(42,9) ; clreol() ;

} while ( valid!=1 ) ;

if (ch == 'N')

return ; 3
2
gotoxy(1,12) ;

cout<<"ENTER THE NEW DATA FOR THE ROOM" ;


HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,14) ;

cout<<"Code : ";

gotoxy(1,15) ;

cout<<"Room no. : " ;

gotoxy(1,16) ;

cout<<"Status : " ;

gotoxy(1,17) ;

cout<<"Tariff : " ;

do

valid = 1 ;

gotoxy(1,25) ;

cout<<"ENTER THE ROOM CODE (SS/DSS/DSD/PS)" ;

gotoxy(13,14) ;

gets(t_rcode) ;

int result;

char string[3],string1[3],string2[3],string3[3];

strcpy(string,"SS");

strcpy(string1,"DSS");

strcpy(string2,"DSD");

strcpy(string3,"PS");

if(strcmp(t_rcode,string)==0||strcmp(t_rcode,string1)==0||strcmp(t_rcode,string2)==0||

strcmp(t_rcode,string3)==0)

result=0;

} 3
3
else

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
result=1;

if (result==1)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"INVALID CODE" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(13,14) ; clreol() ;

} while ( valid == 0 );

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ROOM NUMBER" ;

gotoxy(13,15) ;

cin>>t_roomno ;

getch(); 3
4
if ( t_roomno <= 0 || t_roomno > 900 )

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"IT SHOULD NOT BE NEGATIVE OR ZERO OR GREATER THAN

900" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(13,15) ; clreol() ;

if ( room_found( t_roomno ) && t_roomno != tr )

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. ALREADY EXIST" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(13,15) ; clreol() ;

} while ( valid!=1 ) ; 3
5
do

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ROOM STATUS : V=vacant, O=occupied" ;

gotoxy(13,16) ;

cin>>t_status ;

getch();

t_status = toupper(t_status) ;

if (t_status != 'O' && t_status != 'V')

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"INVALID DATA ENTERED" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(13,16) ; clreol() ;

} while ( valid!=1 ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ; 3
6
gotoxy(1,25) ;

cout<<"ENTER THE TARIFF FOR THE ROOM" ;


HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(13,17) ;

cin>>t_tariff ;

getch();

if ( t_tariff <= 0 )

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"IT SHOULD NOT BE NEGATIVE OR ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(13,17) ; clreol() ;

} while ( valid!=1 ) ;

gotoxy(1,19) ;

cout<<"Do you want to save the record (y/n) : " ;

cin>>ch;

do

valid = 1 ;

gotoxy(42,19) ;

ch = getch() ;

ch = toupper(ch) ; 3
7
if (ch != 'Y' && ch != 'N')

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
valid = 0 ;

gotoxy(42,19) ; clreol() ;

} while ( valid!=1 ) ;

if (ch == 'Y')

fstream file ;

file.open("ROOM.DAT", ios::in) ;

fstream temp ;

temp.open("temp.dat", ios::out) ;

while ( !file.eof() )

file.read((char *) this, sizeof(room)) ;

if ( roomno == tr )

strcpy(roomcode,t_rcode);

roomno=t_roomno;

status=t_status;

tariff=t_tariff;

temp.write((char *) this, sizeof(room)) ;

else

{ 3
8
temp.write((char *) this,sizeof(room));

}
HOTEL MANAGEMENT SYSTEM USING PYTHON
}

file.close() ;

temp.close() ;

file.open("ROOM.DAT", ios::out) ;

temp.open("temp.dat", ios::in) ;

temp.seekg(0) ;

while ( !temp.eof() )

temp.read((char *) this, sizeof(room)) ;

file.write((char *) this, sizeof(room)) ;

file.close() ;

temp.close() ;

remove("temp.dat");

void room :: deletion(void)

clrscr() ;

int valid ;

char ch ;

int t_roomno ;

gotoxy(1,3) ;

cout<<"Enter the Room no. to be deleted " ;

cin>>t_roomno ; 3
9
if ( !room_found( t_roomno ) )

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. NOT FOUND" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

return ;

display_record(t_roomno) ;

gotoxy(1,10) ;

cout<<"Do you want to delete this Room Record (y/n) : " ;

do

valid = 1 ;

gotoxy(48,10) ;

cin>>ch ;

getch() ;

ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')

valid = 0 ;

gotoxy(42,9) ; clreol() ;

} while ( !valid ) ;

if (ch == 'N')

return ; 4
0

fstream file ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
file.open("ROOM.DAT", ios::in) ;

fstream temp ;

temp.open("temp.dat", ios::out) ;

while ( !file.eof() )

file.read((char *) this, sizeof(room)) ;

if ( roomno == t_roomno )

else

temp.write((char *) this,sizeof(room));

file.close() ;

temp.close() ;

file.open("ROOM.DAT", ios::out) ;

temp.open("temp.dat", ios::in) ;

temp.seekg(0) ;

while ( !temp.eof() )

temp.read((char *) this, sizeof(room)) ;

file.write((char *) this, sizeof(room)) ;

} 4
1
file.close() ;

temp.close() ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
remove("temp.dat");

int room :: room_found ( int t_roomno )

fstream file ;

file.open("ROOM.DAT", ios::in) ;

file.seekg(0) ;

int found = 0 ;

while (file.read((char *) this, sizeof(room)))

if ( roomno == t_roomno )

found = 1 ;

file.close() ;

return found ;

void room :: display_record(int t_roomno)

fstream file ;

file.open("ROOM.DAT", ios::in) ;

file.seekg(0) ;

int found = 0 ;

while (file.read((char *) this, sizeof(room)) && !found)

if (t_roomno == roomno) 4
2
{

found = 1 ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,5) ;

cout<<"Room code : " <<roomcode ;

gotoxy(1,6) ;

cout<<"Room no. : " <<roomno ;

gotoxy(1,7) ;

cout<<"Status : " <<status ;

gotoxy(1,8) ;

cout<<"Tariff : " <<tariff ;

file.close () ;

void room :: display_room_record(int t_roomno)

fstream file ;

file.open("ROOM.DAT", ios::in) ;

file.seekg(0) ;

int found = 0 ;

while (file.read((char *) this, sizeof(room)) && !found)

if (t_roomno == roomno)

found = 1 ;

gotoxy(1,5) ;

cout<<"Room code : " <<roomcode ;

gotoxy(1,6) ; 4
3
cout<<"Room no. : " <<roomno ;

gotoxy(1,7) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
cout<<"Status : " <<status ;

gotoxy(1,8) ;

cout<<"Tariff : " <<tariff ;

file.close () ;

void customer :: add(void)

room r ;

menu m1;

char ch ;

int valid = 1 ;

int t_roomno , t_no_cust ;

char t_name[21] , t_address[35] , t_phone[8] , t_nation[16] , t_passport[30] ;

float t_advance , t_misc , t_room_srv ;

clrscr() ;

gotoxy(1,1) ;

cout<<"Enter the details of the Customer" ;

gotoxy(1,3) ;

cout<<"Room no. :";

gotoxy(1,4) ;

cout<<"Name :";

gotoxy(1,5) ; 4
4
cout<<"No. of guests : " ;

gotoxy(1,6) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
cout<<"Address :";

gotoxy(1,7) ;

cout<<"Phone :";

gotoxy(1,8) ;

cout<<"Nationality :";

gotoxy(1,9) ;

cout<<"Passport no. :";

gotoxy(1,11) ;

cout<<"Advance :";

gotoxy(1,12) ;

cout<<"Miscellineous : " ;

gotoxy(1,13) ;

cout<<"Room service :";

char t_status;

do

valid=1;

gotoxy(20,3) ;

cin>>t_roomno ;

t_status = r.room_status(t_roomno) ;

if (!r.room_found(t_roomno) || t_status == 'O')

{ valid=0;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

4 OR NOT VACANT" ;
cout<<"ROOM NO. NOT FOUND
5
gotoxy(1,25) ;

cout<<"Press any key to continue..." ;


HOTEL MANAGEMENT SYSTEM USING PYTHON
getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,3) ; clreol() ;

}while(!valid);

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE NAME OF THE CUSTOMER" ;

gotoxy(20,4) ;

gets(t_name) ;

if ((strlen(t_name) <= 0) || (strlen(t_name) > 20))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT BE ZERO OR GREATER THAN 20" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,4) ; clreol() ; 4
6
}

} while ( !valid ) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE NO. OF GUESTS WITH THE CUSTOMER" ;

gotoxy(20,5) ;

cin>>t_no_cust ;

if ((t_no_cust < 0) || (t_no_cust > 4))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"GUESTS SHOULD NOT BE LESS THAN 0 OR GREATER THAN 4" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,5) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ; 4
7
gotoxy(1,25) ;

cout<<"ENTER THE ADDRESS OF THE CUSTOMER" ;


HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(20,6) ;

gets(t_address) ;

if ((strlen(t_address) <= 0) || (strlen(t_address) > 50))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT BE ZERO OR GREATER THAN 50" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,6) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE PHONE NO. OF THE CUSTOMER, ENTER '-' FOR NO

PHONE NO." ;

gotoxy(20,7) ;

cin>>t_phone ; 4
8
if ((strlen(t_phone) < 8 && strlen(t_phone) > 1) || (strlen(t_phone) > 8))

{
HOTEL MANAGEMENT SYSTEM USING PYTHON
valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT LESS THAN 8 OR GREATER THAN 8" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,7) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER NATIONALITY OF THE CUSTOMER" ;

gotoxy(20,8) ;

gets(t_nation) ;

if ((strlen(t_nation) <= 0) || (strlen(t_nation) > 15))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ; 4
9
cout<<"LENGTH SHOULD NOT LESS THAN ZERO OR GREATER THAN

15" ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,8) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER PASSPORT NO. OF THE CUSTOMER" ;

gotoxy(20,9) ;

gets(t_passport) ;

if ((strlen(t_passport) <= 0) || (strlen(t_passport) > 15))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT LESS THAN ZERO OR GREATER THAN

15" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ; 5
0
gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(20,9) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ADVANCE IN RS. " ;

gotoxy(20,11) ;

cin>>t_advance ;

if (t_advance < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,11) ; clreol() ;

} while ( !valid ) ;

do 5
1
{

valid = 1 ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE MISCELLENIOUS CHARGES" ;

gotoxy(20,12) ;

cin>>t_misc ;

if (t_misc < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,12) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ROOM SERVICE CHARGES" ;

gotoxy(20,13) ; 5
2
cin>>t_room_srv ;

getch();
HOTEL MANAGEMENT SYSTEM USING PYTHON
if (t_room_srv < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,13) ; clreol() ;

} while ( !valid ) ;

gotoxy(1,15) ;

cout<<"Do you want to save the record (y/n) : " ;

do

valid = 1 ;

gotoxy(42,15) ;

cin>>ch;

getch() ;

ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')

valid = 0 ; 5
3
gotoxy(42,15) ; clreol() ;

}
HOTEL MANAGEMENT SYSTEM USING PYTHON
} while ( !valid ) ;

if (ch == 'Y')

r.change_status(t_roomno,'O') ;

fstream file ;

file.open("CUSTOMER.DAT", ios::out | ios::app ) ;

roomno = t_roomno ;

strcpy(name,t_name) ;

strcpy(phone,t_phone) ;

advance = t_advance ;

misc = t_misc ;

room_srv = t_room_srv ;

file.write((char*) this, sizeof(customer)) ;

file.close() ;

m1.main_menu() ;

void customer :: modify(void)

clrscr() ;

room r ;

int valid ;

char ch ;

int t_roomno , tr ;

char t_name[21] , t_phone[8] ; 5


4
float t_advance , t_misc , t_room_srv ;

fstream file ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
file.open("CUSTOMER.DAT", ios::ate) ;

gotoxy(1,3) ;

cout<<"Enter the Room no. of the customer to be modified " ;

cin>>tr ;

getch();

char t_status ;

t_status = r.room_status(tr) ;

if (!r.room_found(tr) || t_status == 'V')

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. NOT FOUND OR ROOM IS VACANT" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

return ;

display_record(tr) ;

gotoxy(1,12) ;

cout<<"Do you want to modify this Room Record (y/n) : " ;

do

valid = 1 ;

gotoxy(48,12) ;

cin>>ch;

getch() ; 5
5
ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')


HOTEL MANAGEMENT SYSTEM USING PYTHON
{

valid = 0 ;

gotoxy(42,12) ; clreol() ;

} while ( !valid ) ;

if (ch == 'N')

return ;

gotoxy(1,14) ;

cout<<"ENTER THE NEW DATA FOR THE CUSTOMER" ;

gotoxy(1,16) ;

cout<<"Room no. :";

gotoxy(1,17) ;

cout<<"Name :";

gotoxy(1,18) ;

cout<<"Phone :";

gotoxy(1,19) ;

cout<<"Advance :";

gotoxy(1,20) ;

cout<<"Miscellineous : " ;

gotoxy(1,21) ;

cout<<"Room service :";

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ; 5
6
cout<<"ENTER THE ROOM NUMBER FOR CUSTOMER : " ;

gotoxy(20,16) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
cin>>t_roomno ;

getch();

t_status = r.room_status(t_roomno) ;

if ((!r.room_found(t_roomno)) || (r.room_found(t_roomno) && t_roomno != tr &&

t_status == 'O'))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. NOT EXIST OR NOT VACANT" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,16) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE NAME OF THE CUSTOMER : " ;

gotoxy(20,17) ;

gets(t_name) ; 5
7
getch();

strupr(t_name) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
fflush(stdin) ;

if ((strlen(t_name) <= 0) || (strlen(t_name) > 20))

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT BE ZERO OR GREATER THAN 20" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,17) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE PHONE NO. OF THE CUSTOMER, ENTER '-' FOR NO

PHONE NO." ;

gotoxy(20,18) ;

cin>>t_phone ;

if ((strlen(t_phone) < 8 && strlen(t_phone) > 1) || (strlen(t_phone) > 8))

{ 5
8
valid = 0 ;

gotoxy(1,25) ; clreol() ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,24) ;

cout<<"LENGTH SHOULD NOT LESS THAN 8 OR GREATER THAN 8" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,18) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ADVANCE RS. " ;

gotoxy(20,19) ;

cin>>t_advance ;

getch();

if (t_advance < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ; 5
9
cout<<"Press any key to continue..." ;

getch() ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,19) ; clreol() ;

} while ( !valid ) ;

do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE MISCALLENIOUS CHARGES" ;

gotoxy(20,20) ;

cin>>t_misc ;

getch();

if (t_misc < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,20) ; clreol() ;6
0
}

} while ( !valid ) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
do

valid = 1 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,25) ;

cout<<"ENTER THE ROOM SERVICE CHARGES" ;

gotoxy(20,21) ;

cin>>t_room_srv ;

getch();

if (t_room_srv < 0)

valid = 0 ;

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"SHOULD NOT LESS THAN ZERO" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

gotoxy(1,24) ; clreol() ;

gotoxy(1,25) ; clreol() ;

gotoxy(20,21) ; clreol() ;

} while ( !valid ) ;

gotoxy(1,23) ;

cout<<"Do you want to save the record (y/n) : " ;

do 6
1
{

valid = 1 ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(42,23) ;

cin>>ch;

getch() ;

ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')

valid = 0 ;

gotoxy(42,23) ; clreol() ;

} while ( !valid ) ;

if (ch == 'Y')

if (t_roomno != tr)

r.change_status(t_roomno,'O') ;

r.change_status(tr,'V') ;

int recno ;

recno = recordno(tr) ;

int location ;

location = (recno-1) * sizeof(customer) ;

file.seekp(location) ;

roomno = t_roomno ;

strcpy(name,t_name) ;

strcpy(phone,t_phone) ;

room_srv = t_room_srv ; 6
2
advance = t_advance ;

misc = t_misc ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
file.write((char *) this, sizeof(customer)) ;

file.close () ;

void customer :: delete_record(int t_roomno)

fstream file ;

file.open("CUSTOMER.DAT", ios::in) ;

fstream temp ;

temp.open("temp.dat", ios::out) ;

while ( !file.eof() )

file.read((char *) this, sizeof(customer)) ;

if ( file.eof() )

break ;

if ( roomno != t_roomno )

temp.write((char *) this, sizeof(customer)) ;

file.close() ;

temp.close() ;

file.open("CUSTOMER.DAT", ios::out) ;

temp.open("temp.dat", ios::in) ;

temp.seekg(0) ;

while ( !temp.eof() )

6
temp.read((char *) this, sizeof(customer)) ;
3
if ( temp.eof() )

break ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
file.write((char *) this, sizeof(customer)) ;

file.close() ;

temp.close() ;

void customer :: deletion(void)

clrscr() ;

room r ;

int valid ;

char ch ;

int t_roomno ;

gotoxy(1,3) ;

cout<<"Enter the Room no. of the customer to be deleted " ;

cin>>t_roomno ;

char t_status ;

t_status = r.room_status(t_roomno) ;

if (!r.room_found(t_roomno) || t_status == 'V')

gotoxy(1,25) ; clreol() ;

gotoxy(1,24) ;

cout<<"ROOM NO. NOT FOUND OR ROOM IS VACANT" ;

gotoxy(1,25) ;

cout<<"Press any key to continue..." ;

getch() ;

return ; 6
4
}

display_record(t_roomno) ;
HOTEL MANAGEMENT SYSTEM USING PYTHON
gotoxy(1,15) ;

cout<<"Do you want to delete this Customer Record (y/n) : " ;

do

valid = 1 ;

gotoxy(52,15) ;

cin>>ch ;

getch() ;

ch = toupper(ch) ;

if (ch != 'Y' && ch != 'N')

valid = 0 ;

gotoxy(52,15) ; clreol() ;

} while ( !valid ) ;

if (ch == 'N')

return ;

r.change_status(t_roomno,'V') ;

delete_record(t_roomno) ;

char room :: room_status(int t_roomno)

fstream file ;

file.open("ROOM.DAT", ios::in) ;

file.seekg(0) ;

int found = 0 ; 6
5
char t_status ;

while (file.read((char *) this, sizeof(room)) && !found)


HOTEL MANAGEMENT SYSTEM USING PYTHON
{

if (t_roomno == roomno)

found = 1 ;

t_status = status ;

END OF PROGRAM

Integration and Test Phase :-

Subsystem integration, system, security, and user acceptance testing is conducted during the integration and
test phase. The user, with those responsible for quality assurance, validates that the functional requirements, as
defined in the functional
requirements document, are satisfied by the developed or modified system. OIT Security staff assess the
system security and issue a security certification and accreditation prior to installation/implementation.
Multiple levels of testing are performed, including:
1>Testing at the development facility by the contractor and possibly supported by end users.
2> Testing as a deployed system with end users working together with contract personnel.
3> Operational testing by the end user alone performing all functions.
Requirements are traced throughout testing,
a final Independent Verification & Validation evaluation is performed and all documentation is reviewed and
accepted prior to acceptance of the system.

 Implementation Phase:-
This phase is initiated after the system has been tested and accepted by the user. In this phase, the system is
6
installed to support the intended business functions.
6
System performance is compared to performance objectives established during the planning phase.
Implementation includes user notification, user training, installation of hardware, installation of software onto
HOTEL MANAGEMENT SYSTEM USING PYTHON
production computers, and integration of the system into daily work processes. This phase continues until the
system is operating in production in accordance with the defined user requirements.

 Operations and Maintenance Phase :-

The system operation is ongoing. The system is monitored for continued performance in accordance with user
requirements and needed system
modifications are incorporated. Operations continue as long as the system can be effectively adapted to
respond to the organization’s needs. When modifications or changes are identified, the system may reenter the
planning phase. The purpose of this phase is to:
1>Operate, maintain, and enhance the system .
2>Certify that the system can process sensitive information.
3>Conduct periodic assessments of the system to ensure the functional requirements continue to be satisfied.
4>Determine when the system needs to be modernized, replaced, or retired.

OUTPUT UNIT

Function Details
The basic objective of HOTEL MANAGEMENT SYSTEM is to generalize and
simplify the monthly or day to day activities of Hotel like Room activities, Check in of
New Customer, Check out of customer, Assigning a room according to customer
requirement, and finally compute the bill etc. which has to be performed repeatedly on
regular basis. To provide efficient, fast, reliable and user-friendly system is the basic
motto behind this exercise.
Let us now discuss how different functions handle the structure and data files:
1.Password
In this module, this website is for multiple users. If a User enters a password and the
software checks its validity. If the password is valid then option is given to change the
password, otherwise “Invalid
User/Password” message is displayed. There is an6option for password recovery, log out,
7
login, new users sign in. The Administrator can also update changes in the site after
login.
HOTEL MANAGEMENT SYSTEM USING PYTHON
2 Creating new Entity (Hotel, Room, Customers,Members etc.)
This is used to add a new employee details, delete entity details and view the details. In
that screen, the automatic item is created.
In this function, whenever a new entity is required to be added the corresponding forms
are opened and the database is manipulated to check whether the data is already existing
or not. If it already exists, then it prompts that “Entry already existing” and if not than the
data is entered with the various validation checks.
3.Function NEW_ROOM()
This is the function used to open a new room for a customer so that he/she can
assign a separate room . In that screen, the automatic room number is created.
After opening a new room for the customer, finally a room is assigned to a
customer and the room records are appended in the data file.
4.Function CHECKIN_CUSTOMER()
This function is used to admit a customer in our Hotel after entering his all
personal details like Name, Address, Phone, Sex and then he/she is assigned a
room from NEW_ROOM() function.
5.Function CHECKOUT_CUSTOMER()
This function is used to checkout the customer details from database. When the
user inputs his room number, the same room number will be checked in the
database, if the room number is matched in the database, then the customer will
be check-out from the database and transferred the record of the checkout to
another table of database so that the Hotel Management has the record of
customers who have check-out to fulfill his legal liabilities.
6.Function GENERATE_BILL()
When any customer check-out, his/her bill is generated automatically by
calculated check-out date minus check-in date and getting multiplied it by daily
room charge plus other charges and the bill has to be saved in the table in the
database.
7.Function DISPLAY_RECORD()
This function is used to display all the transaction including the customer name, address,
phone, bed number, and doctor assigned to him/her in the screen. This is a global repor to
display all the transaction records in the screen.
8 Validation of Data Entered by the User & Error Handling
In this function, the validity of data entered by the user during the various business
6
8
processes is checked through various validation checks. For example, there should not be
any characters entered in the numeric fields, likewise if there is any error occurs than it
should handle that particular error and give the required messages.
HOTEL MANAGEMENT SYSTEM USING PYTHON
10 Searching
In this function, room, customer well as members can search details from the database
according to their authentications.
11.Report Generation
In this function reports are generated for the following entities:
a) Customer Details.
b) Requirements of the Customers
c) Rooms Details
d) Bill Details
e) Check in Reports
f) Booking Details
g) Online Bookings
h) Checkout Details
i) Membership Details
j) Packages Available.
CONCLUSION

 This project is designed to meet the requirements of Hotel Management. It has

been developed in JSP, Servlets keeping in mind the specifications of the system.

 For designing the system we have used simple data flow diagrams.

 Overall the project teaches us the essential skills like:

 Using system analysis and design techniques like data flow diagram in designing the

system.

 Understanding the database handling and query processing.

6
9
HOTEL MANAGEMENT SYSTEM USING PYTHON

Bibliography
Faculty guidance:
Ms.PREETI SARODE.
Book Guidance:
 Object Oriented Programming with C++
by Sumita Arora.
 E.Balagurusamy
Website Guidance:
www.google.co.in

7
0

You might also like