Professional Documents
Culture Documents
On
Developed By:
Dr P PRAVEEN
Associate Professor
Submitted to
Intelligence SR University
www.sru.edu.in
June 2023
Department of Computer Science and Artificial Intelligence
CERTIFICATE
This is to certify that the PSP course project report entitled “ Hotel Management
System” is a record of bonafide work carried out by the student(s) Vishwa Vardhini,
Deepakraj, Varsha & Aditya bearing roll number(s) 2203A51172, 2203A51179,
2205A41141 & 2203A51167 of Computer Science Engineering and Electronics
Communication Engineering departments during the academic year 2022-23.
Supervisor
(Dr P Praveen)
INDEX
1. Problem statement 1
2. Module-wise description 2
3. Knowledge required to develop the project 4
4. Source code (.c file code followed by .h file code) 5
5. Results 35
2205A41149 P. Akshitha
2205A41155 Y. Shashank
2205A41253 B. Revanth kumar
2205A41255 Sidra Samreen
PROBLEM STATEMENT:
Develop a C Application to store details of the Customer,
F, Transport, Residential, Admissions, Sports data…… in
terms of (Name , E-mail , Mobile.No ,, fees, Salaray, All
details……..).
Provide the functionality for below mentioned:
1. Read Customer details .
2. Arranging them in the branch wise order.
3. Giving everyone a unique login id.
4. Similarly reading ‘n’ Faculty details.
5. Details of all the Faculty.
6. Sort ‘n’ students details according to their respective
branches:
CSE
ECE
EEE
CIVIL
MECHANICAL
7. Print the ‘n’ students details according to :
Hallticket.no
Name
Course
Mobile.no
Email id
Year and Semester
Attendence
Grade
Fee details
Accomodation
8. Print ‘n’ Faculty details according to :
ID
Name
Subject
Mobile.no
Email id
Experience
Salary
Rating
Attendence
Accomodation
9. print all the sports available in the college according to:
Sport
Coach
No.of Courts
Area
No.of rooms
No.of floors
No.of hostels
No.of Wardens
No.of Students
No.of Restrooms
1. Read/Input
Implement a text-based menu-driven interface for
interacting with the system.
Use input/output functions (e.g., printf, scanf) to display
and collect user information.
2. Sorting
3. File Handling:
4. Print
In this module all the stored details of n customers will
be displayed on to the screen. In this module printf
function and for loop are used.
KNOWLEDGE REQUIRED TO DEVELOP THIS APPLICATION
Control Statements (if, if-else, switch)
Arrays (1D/2D-arrays)
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<time.h>
#include<stdlib.h>
void begin();
void show_details();
void book_room();
void food_menu();
struct
{
char name[20];
char address[50];
char email_id[30];
char nationality[25];
int ap,app,appp;
int roomno;int food;
char *roomtype;
int billprice,Total;
char *program;
}person;
int main()
{
person.roomno =0;
person.food =0;
person.billprice =0;
person.program = "notchosen";
printf(" ***********************");
printf("\n ||WELCOME TO SRU C2 HOTEL||\n");
printf(" ***********************\n");
printf(" \n\n");
printf("====* Enter Customer Details *====\n\n");
printf("please enter person name:");
gets(person.name);
printf("enter person address:");
gets(person.address);
printf("enter person nationality:");
gets(person.nationality);
printf("enter person email_id:");
gets(person.email_id);
printf("\n\n\t\t** Thank's Giving Your Details **\n\n\n ");
begin();
return 0;
}
void begin(void)
{
int decide;
printf("=> MAIN MENU\n");
printf(" =========\n");
printf("1.FOOD MENU CARD\n");
printf("2.BOOK A ROOM\n3.SHOW MY DETAILS\n4.ABOUT US\
n5.CONTACT US\n6.EXIT\n\n");
printf("Enter your choise = ");
scanf("%d",&decide);
switch(decide)
{
case 1:
food_menu();
case 2:
book_room();
break;
case 3:
show_details();
break;
case 4:
printf("\t\t\t\t**NONE OF THIS\n\n");
case 5:
printf("YOU CAN CONTACT US ON \n\t\t\tE-Mail
sruc2hotel@gmail.com\n\n\t\t\tCONTACT NO 9553254605\n\n");
printf("\t\t\tWHATSAPP NO 9347515101\n");
case 6:
printf("\n\n\n\t\tVisit again!");
printf("\n\n\t***Thank you for trusting our service.***\n");
break;
default:
printf("Invalid choice. Please try again.\n");
break;
begin();
system("cls");
break;
}
}
void food_menu(void)
{
system("cls");
if(person.food == 0)
{
int ch,qty,i,net=0;
joes:
printf(" =======================");
printf("\n |WELCOME TO SRU C2 HOTEL|\n");
printf(" =======================\n");
printf("\n\t=>MENU CARD");
printf(" \n");
printf("\n\tBREAK FAST");
printf("\n\t\t1.IDLY Rs:40");
printf("\n\t\t2.DOSA Rs:55");
printf("\n\t\t3.VADA Rs:40");
printf("\n\t\t4.PURI Rs:45");
printf("\n\t\t5.CHAPPATHY Rs:40");
printf("\n\tSOUPS");
printf("\n\t\t8.Tomato soup Rs:110");
printf("\n\t\t9.Sweetcorn soup Rs:115");
printf("\n\t\t10.Chicken soup Rs:160");
printf("\n\tSTARTER'S");
printf("\n\t\t11.Veg Manchurian Rs:110");
printf("\n\t\t12.Paneer Chilly Rs:125");
printf("\n\t\t13.Chicken Lollypop Rs:180");
printf("\n\t\t14.Chicken Chrispy Rs:185");
printf("\n\tMAIN COURSE");
printf("\n\t\t15.Veg Rice Rs:120");
printf("\n\t\t16.Egg Fried Rice Rs:140");
printf("\n\t\t17.Chicken Biryani Rs:270");
printf("\n\t\t18.Mutton Biryani Rs:330");
printf("\n\t\t19.Fish Fry Rs:210");
case 15:
printf("\nYou have selected == VEG RICE");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*120);
break;
case 16:
printf("\nYou have selected == EGG FRIED RICE");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*140);
break;
case 17:
printf("\nYou have selected == CHICKEN BIRYANI");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*270);
break;
case 18:
printf("\nYou have selected == MUTTON BIRYANI");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*330);
break;
case 19:
printf("\nYou have selected == FISH FRY");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*210);
break;
case 20:
printf("\nYou have selected == SPRITE");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*25);
break;
case 21:
printf("\nYou have selected == THUMS UP");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*25);
break;
case 22:
printf("\nYou have selected == MILK SHAKE");
printf("\nEnter The Qty : ");
scanf("%d",&qty);
net=net+(qty*70);
break;
default:
printf("\nInvalid Item Selection");
break;
}
printf("\nDo You want to continue press 1: ");
scanf("%d",&i);
if(i==1)
{
goto joes;
}
person.food = net;
printf("\nTotal amount : %d",net);
system("cls");
printf("\tNOTE\n\t * SUCESSFULLY YOUR FOOD DETAILS ARE SAVED\
n\n");
}
}
void book_room(void)
{
if(person.roomno == 0)
{
int type_of_rooms;
char ch,c;int days;
printf(" =======================");
printf("\n |WELCOME TO SRU C2 HOTEL|\n");
printf(" =======================\n\n");
printf("\nWhat type of room do you want to book?\n");
printf("\n1.Basic Room(NON A/C) Rs 1000\n2.Medium room(A/C)
Rs 2000\n3.DELUXE ROOM(A/C) Rs 3000\n4.EXIT\n");
scanf("%d",&type_of_rooms);
fflush(stdin);
if(type_of_rooms==1)
{
printf("\nDo you accept this room?(Press 's' for accept/Press 'n' to exit)\n");
fflush(stdin);
scanf("%c",&c);
if (c=='s')
{
printf("\nDo you accept this room?(Press 's' for accept/Press 's' to exit)\
n");
scanf("%c",&c);
if(c=='s')
{
printf("\n =>You choose medium room(A/C).\n\n");
printf(" How Many Day's They Want To Stay = ");
scanf("%d",&days);
printf(" your room no is 212\n\n");printf("\n\t\t**** Enjoy your stay
****\n\n\n");
person.billprice +=days*2000;
person.roomno = 212;
person.roomtype = "medium";
begin();
}
else
begin();
}
if(type_of_rooms==3)
{
printf("\nDo u accept this room?(Press 's' for accept/Press 'n' to exit)\n");
scanf("%c",&c);
if(c=='s')
{
printf("\n =>You choose deluxe room(A/C).\n\n");
printf(" How Many Day's They Want To Stay = ");
scanf("%d",&days);
printf("\n your room no is 312\n\n");printf("\n\t\t**** Enjoy your stay
****\n\n");
person.billprice +=days*3000;
person.roomtype = "deluxe";
person.roomno = 312;
begin();
}
else
begin();
}
if(type_of_rooms==4)
begin();
}
else
printf("you have already booked a room\n\n\n");
}
void show_details(void)
{
system("cls");
time_t timer = time(NULL);
if(strcmp(person.program,"notchosen") != 0)
{
fprintf(ifp,"Program : %s\n",person.program);
}
person.Total=person.billprice+person.food;
fprintf(ifp,"\n\n**press Ctrl+p to print your details(Bill)");
fflush(ifp);
fclose(ifp);
begin();
}
}
SOURCE CODE [HEADER FILE]:
RESULTS: