HOSTEL MANAGEMENT SYSTEM
PROJECT REPORT
Submitted by
P.PRAKASHITA RAJKUMARI
RA2211056010067
Under the Guidance of
Dr .C .Tamizhselvan
Assistant professor, Department of Data Science and Business System
In partial satisfaction of the requirements for the degree of
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE ENGINEERING
with specialization in Data Science and Business System
SCHOOL OF COMPUTING
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR - 603203
MAY 2023
SRM INSTITUTION OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR-603203
BONAFIDE CERTIFICATE
Certified that this Project Report titled “ Hostel Management System.” is the
bonafide work done P.PRAKASHITA RAJKUMARI RA2211056010067 who completed
the project under my supervision. Certified further, that to the best of my knowledge the work
reported herein does not form part of any other work.
SIGNATURE SIGNATURE
Dr. C.Tamizhselvan Dr. M.Lakshmi
OODP – Course Faculty Head of the Department
Assistant Professor Department of Data Science and Business System
Department of Data Science and Business System SRMIST
SRMIST
TABLE OF CONTENTS
S.No CONTENTS PAGE NO
5
1. Problem Statement
5
2. Modules of Project
3. Diagrams
5
a. Use case Diagram
6
b. Sequence Diagram
6
c. Deployment Diagram
7
d. Activity Diagram
7
e. Collobrative Diagram
8
f. Component Diagram
9
g. Class Diagram
10
h. State Diagram
10-19
4. Code/Output Screenshots
20
5. References
Hostel Management System
OBJECTIVE:-
* The objective of a hostel student management system is to provide a centralized platform for
managing various aspects of a hostel or dormitory, such as student admissions, room
allocations, attendance tracking, meal management, and billing. The system should be
designed to make the management process more efficient and effective, while also *
Streamlining hostel management processes. The system should automate and simplify various
management tasks, such as admissions, room allocation, attendance tracking, meal
management, and billing. * Improving communication: The system should facilitate
communication between students, staff, and parents/guardians. This may include features such
as email or SMS notifications, announcements, and messaging.
MODULES USED:-
1.BOKKING MODULE
2.CANCLEING MODULE
3. PAYMENT MODULE
4.ROOM MANGMENT MODULE
5.STUDENT MANGMENT MODULE
PROCEDURE:-
1.IN THE HOSTEL MANGMENT SYSTEM BOOKING .FIRST ENTER THE LOGIN
DETAILS
2. SELECT THE HOSTEL ,FLOOR AND ROOM NUMBER
3.STORING THE DATA AND GOING THE PAYMENT METHOD
4.PAYMENT COMPLETED AND WE WILL GET THE PAYMENT SUCESSFUL
5. WE WILL GET PAYMENT RECEPITE AND CONFIRMATION LETTER
6. THE HOSTEL MANGMENT SYSTEM PROCESS COMPLETED
USE CASE DIAGRAM
A use case diagram for hostel management system is a behavioral diagram that summarizes the
activities done in the system and its user details. It shows the structure of the system behavior
and the interactions between the actors and the use cases
Actors: Hostel Admin, Employees, and Customers
Use Cases: Manage Customers’ Information and Status, Manage Rooms and Accommodation,
Manage Expenses and Payments, Generate Reports
Relationships: Include and Extend
Include: Sub-processes that must be performed to complete a main process
Extend: Sub-processes that can be performed optionally or conditionally
Sequence diagram for Hostel Management
In this diagram, the sequence of interactions between the Guest, Hostel, Room, and Billing
classes is shown for three scenarios: checking availability, booking a room, and canceling a
booking.
In the first scenario, the Guest requests to check the availability of a room. The Hostel class
receives the request and forwards it to the Room class. The Room class checks the availability
of the requested room and returns the availability status to the Hostel class, which in turn
returns it to the Guest.
In the second scenario, the Guest requests to book a room. The Hostel class receives the
request and forwards it to the Room class. The Room class reserves the requested room and
returns the reservation status to the Hostel class, which in turn generates a bill through the
Billing class. The Billing class returns the bill ID to the Hostel class, which in turn returns the
reservation confirmation and bill ID to the Guest.
In the third scenario, the Guest requests to cancel a booking. The Hostel class receives the
request and forwards it to the Room class. The Room class cancels the reservation and returns
the cancellation status to the Hostel class, which in turn updates the bill through the Billing
class. The Billing class returns the updated bill status to the Hostel class, which in turn returns
the cancellation confirmation and updated bill status to the Guest.
Deployment diagram
Web browser: The client-side component that sends HTTP requests to the hostel server for
interacting with the hostel management system.
Hostel server: Handles HTTP requests, processes them, and generates HTTP responses to send
back to the web browser.
Database server: Stores data related to the hostel management system, including room
availability, guest bookings, customer information, and payment transactions.
Payment gateway: A separate component responsible for processing payments made by guests
for their bookings.
Deployment diagram: Provides a high-level view of the physical architecture, helping design
and implement the network infrastructure and hardware requirements.
Activity diagram for Hostel Management
Start Management: Begins the process of managing the hostel.
Check-in Guest: Registers the guest, assigns a room, verifies identification, and collects
payment.
Manage Room: Handles room availability, assigns rooms, and coordinates maintenanceand
cleaning.
Check-out Guest: Releases the guest, inspects the room for damages, and returns deposits.
End Management: Concludes the process of managing the hostel.
Collabration diagram
Checking availability: Guest requests availability from Hostel, which checks with Room and
returns status to Guest.
Booking a room: Guest requests booking from Hostel, which reserves the room and generates a
bill.
Canceling a booking: Guest requests cancellation from Hostel, which cancels the reservation
and updates the bill.
Requesting booking information: Guest requests booking information from Hostel, which
retrieves it from Room and provides it to Guest.
Checking out: Guest checks out from Hostel, marking the room as available and finalizing the
bill.
Component diagram for Hostel Management
Checking availability: Guest requests availability from Hostel, which checks with Room
and returns status to Guest.
Booking a room: Guest requests booking from Hostel, which reserves the room in Room and
generates a bill.
Canceling a booking: Guest requests cancellation from Hostel, which cancels the reservation in
Room and updates the bill.
Requesting booking information: Guest requests booking information from Hostel, which
retrieves the information from Room and provides it to Guest.
Checking out: Guest checks out from Hostel, which marks the room as available in Room and
finalizes the bill.
CLASS DIAGRAM
Hostel: Represents the hostel and manages guests, rooms, and reservations.
Guest: Represents a guest and handles booking, canceling reservations, and profile updates.
Room: Represents a room and handles reservations and availability.
Staff: Represents staff members and manages their information.
Billing: Manages billing information for guest stays, including generating bills and processing
payments.
STATE DIAGRAM
Checking availability: Guest requests availability from Hostel, which forwards the request to
Room. Room checks availability and returns status to Hostel, which returns it to Guest.
Booking a room: Guest requests booking from Hostel, which forwards the request to Room.
Room reserves the room, returns status to Hostel, which generates a bill through Billing.
Billing returns bill ID to Hostel, which confirms booking and provides the bill ID to Guest.
Canceling a booking: Guest requests cancellation from Hostel, which forwards the request to
Room. Room cancels the reservation, returns status to Hostel, which updates the bill through
Billing. Billing returns updated bill status to Hostel, which confirms cancellation and provides
the updated bill status to Guest.
Code
#include <iostream>
#include <string.h>
using namespace std;
struct node
{
int num = 1;
int fill = 0;
char name[3][10];
node *next;
node *prev;
};
class hostel
{
node *header[3];
node *cn;
public:
hostel()
{
for (int i = 0; i < 3; i++)
header[i] = NULL;
}
void create()
{
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 9; j++)
{
node *nn = new node;
nn->next = NULL;
nn->prev = NULL;
if (header[i] == NULL)
{
header[i] = nn;
nn->num = 1;
}
else
{
node *cn = header[i];
while (cn->next != NULL)
{
cn = cn->next;
}
if (j == 3 || j == 5 || j == 7 || j == 8)
{
cn->num = 3;
}
if (j == 2 || j == 4 || j == 6)
{
cn->num = 2;
}
cn->next = nn;
nn->prev = cn;
}
}
}
}
void display()
{
int j = 0, k = 0, l = 0;
for (int i = 0; i < 48; i++)
{
cout << "--";
}
cout << "\n "
;
for (int i = 1; i < 4; i++)
{
cout << "| Floor number : "<< i << " \t\t";
}
cout << "|\n" ;
for (int i = 0; i < 48; i++)
{
cout << "--";
}
cn = header[j];
node *sn = header[j + 1];
node *tn = header[j + 2];
cout << "\n ";
while (cn != NULL)
{
if (cn->fill != cn->num && cn->num != 0)
{
j++;
cout << "| room no : "<< j;
cout << "->Vacant cots->"<< cn->num;
}
else
{
j++;
cout << "| room no : "<< j;
cout << "->Present ";
}
if (sn->fill != sn->num && sn->num != 0)
{
k++;
cout << "\t | room no : "<< j;
cout << "->Vacant cots->"<< sn->num;
}
else
{
k++;
cout << " \t | room no : "<< j;
cout << "->Present ";
}
if (tn->fill != tn->num && tn->num != 0)
{
l++;
cout << "\t | room no : "<< j;
cout << "->Vacant cots->"<< tn->num << "| ";
}
else
{
l++;
cout << "\t | room no : "<< j;
cout << "->Present "<< " | ";
}
cout << " \n ";
for (int i = 0; i < 48; i++)
{
cout << "--" ;
}
cout << "\n ";
cn = cn->next;
sn = sn->next;
tn = tn->next;
}
}
void book(int people)
{
int floor, room;
cout << "\nEnter the floor number : ";
cin >> floor;
try
{
if (floor < 0 || floor > 4)
{
throw(floor);
}
cn = header[floor - 1];
cout << "\nEnter the room number : ";
cin >> room;
try
{
if (room < 0 || room > 10)
{
throw(room);
}
else
{
int i = 1;
while (i < room)
{
cn = cn->next;
i++;
}
if (cn->num >= people)
{
cout << "\nroom is vacant you can apply for room" ;
int count = 0;
while (cn->fill - 1 <= cn->num)
{
cout << "\nEnter name "<< cn -> fill + 1 << " : ";
cin >> cn->name[cn->fill];
count++;
cn->fill++;
if (count >= people)
{
break;
}
}
cn->num = cn->num - people;
}
else
{
cout << "\nroom is not vacant... SORRY !!!";
}
}
}
catch (int r)
{
cout << "\ninvalid room number : "<< r;
}
}
catch (int r)
{
cout << " \ninvalid floor number : " << r;
}
}
void cancle(int check)
{
char namecheck[10];
int flag = 0;
int room, i = 1;
try
{
if (check < 0 || check > 4)
{
throw(check);
}
else
{
cout << " Enter the room no : ";
cin >> room;
try
{
if (room < 0 || room > 10)
{
throw(room);
}
else
{
cout << " Enter the name to be delete :";
cin >> namecheck;
cn = header[check - 1];
while (i < room)
{
cn = cn->next;
i++;
}
i = 0;
while (i < 3)
{
if (!strcmp(namecheck, cn -> name[i]))
{
flag = 1;
break;
i = 0;
}
else
i++;
}
if (flag == 1 && cn->fill != 0)
{
cout << "\nrecord deleted : "<< cn -> name[i];
cn->name[i][0] ='A';
cn->name[i][1] ='\0';
cn->fill--;
cn->num++;
}
else
cout << "\nrecord not present ";
}
}
catch (int r)
{
cout << "\ninvalid room number : " << r;
}
}
}
catch (int r)
{
cout << " \n floor dosn't exist : " << r;
}
}
void upgrade(int check)
{
char namecheck[10];
int room, i = 1;
try
{
if (check < 0 || check > 4)
{
throw(check);
}
else
{
cout << " Enter the room no : ";
cin >> room;
try
{
if (room < 0 || room > 10)
{
throw(room);
}
else
{
cout << "Enter the name to be updated :";
cin >> namecheck;
cn = header[check - 1];
while (i < room)
{
cn = cn->next;
i++;
}
i = 0;
while (i < 3)
{
if (!strcmp(namecheck, cn -> name[i]))
{
cout << "\nenter updated name : " ;
cin >> cn->name[i];
break;
}
else
i++;
}
if (i >= 3)
cout << "record not found ";
else
{
cout << "\nrecord updated\nprevious name : "<< namecheck << "\nupdated
name : "<< cn->name[i];
}
}
}
catch (int r)
{
cout << "\ninvalid room number : "<< r;
}
}
}
catch (int r)
{
cout << "\n floor dosn't exist : "<< r;
}
}
};
int main()
{
hostel obj;
int key;
char ch;
int floorcheck;
obj.create();
do
{
cout << "\n1.Book a room for 1 person\n2.Book a room for 2person\n3.Book a room for 3
person\n4.Display the current status of rooms\n5.cancle a cot\n6.upgrade"<< endl;
cout << " Enter your choice : " ;
cin >> key;
switch (key)
{
case 1:
{
obj.book(1);
break;
}
case 2:
{
obj.book(2);
break;
}
case 3:
{
obj.book(3);
break;
}
case 4:
{
obj.display();
break;
}
case 5:
{
cout << "Enter floor number : ";
cin >> floorcheck;
obj.cancle(floorcheck);
break;
}
case 6:
{
cout << "Enter floor number : ";
cin >> floorcheck;
obj.upgrade(floorcheck);
break;
}
default:
cout << "\nInvalid choice ";
}
cout << "\nDo you want to continue(Y / N) ";
cin >> ch;
} while (ch =='Y'|| ch =='y');
}
OUT PUT:
Conclusion and result: The result of the project was a functional and user-friendly console-
based application that can perform various operations related to hostel management. The
application can handle multiple users with different roles and privileges, such as administrator,
warden, student, etc. The application can also generate reports and display statistics on the
hostel occupancy, revenue, expenses, etc. The application can handle various exceptions and
errors gracefully and provide appropriate feedback to the user.
Refrence: Javapoint,uml diagrams.