├── Output page.png ├── README.md └── Hotel Room booking management.c /Output page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GurumeetaSivakumar/Hotel-Room-Booking-Management-system/HEAD/Output page.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hotel-Room-Booking-Management-system 2 | # Overview 3 | The Hotel Room Booking Management System is a comprehensive solution designed to streamline the process of managing room bookings and related services in a hotel. This system offers functionalities for booking rooms, managing customer details, and handling food-related services.This project is done using C programming. 4 | 5 | # Features 6 | Room Booking: Users can easily browse available rooms, select their preferences, and book rooms for specified dates. 7 | 8 | Customer Management: Keep track of customer details, preferences, and booking history to provide a personalized experience. 9 | 10 | Food Services: Manage food-related services such as in-room dining or restaurant reservations, enhancing the overall guest experience. 11 | 12 | Payment Integration: Secure and seamless integration with payment gateways for handling room and service payments. 13 | 14 | Admin Dashboard: A centralized dashboard for administrators to monitor bookings, manage room availability, and view analytics. 15 | -------------------------------------------------------------------------------- /Hotel Room booking management.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #define PRICE_PER_DAY 100 6 | #define NUM_ROOMS 50 7 | 8 | struct CustomerDetails 9 | { 10 | char name[20]; 11 | char address[25]; 12 | long phonenumber; 13 | char nationality[15]; 14 | long idproof; 15 | char email[20]; 16 | char period[10]; 17 | char arrivaldate[10]; 18 | 19 | } s; 20 | 21 | void frontpage(); 22 | 23 | void frontpage() { 24 | printf(" -------------------------------------------------------------------------\n"); 25 | printf("| |\n"); 26 | printf("| |\n"); 27 | printf("| O 0 OOOOOO O OOOOOO OOOOOOO OO OO OOOO00 |\n"); 28 | printf("| O 0 0 O 0 0 O O O 0 O O |\n"); 29 | printf("| O 0 0 OOO0O0 O O O O O O O OOOO00 |\n"); 30 | printf("| O 0 0 O 0 O O O O 0 O O |\n"); 31 | printf("| OO0 000 O00000 OOOOOOO OOOOOO 0OOOOOO O O OOOOOO |\n"); 32 | printf("| |\n"); 33 | printf(" -------------------------------------------------------------------------\n"); 34 | 35 | 36 | printf("\n :::::::::::::::::::::::::::::::::::::::"); 37 | printf("\n :: ::"); 38 | printf("\n :: *********************** ::"); 39 | printf("\n :: * * ::"); 40 | printf("\n :: - WELCOME TO - ::"); 41 | printf("\n :: * DS HOTEL * ::"); 42 | printf("\n :: - - ::"); 43 | printf("\n :: *********************** ::"); 44 | printf("\n :: ::"); 45 | printf("\n :::::::::::::::::::::::::::::::::::::\n\n"); 46 | 47 | 48 | printf("\n Kind heartedly we welcome u all,We make u feel luxurious \n"); 49 | 50 | } 51 | 52 | void intro() { 53 | printf(" AMINITIES\n"); 54 | printf("\t\t\t1. non stop Power Supply.\n"); 55 | printf("\t\t\t2. lift Service available\n"); 56 | printf("\t\t\t3. Huge parking space.\n"); 57 | printf("\t\t\t4. Laundary service.\n"); 58 | printf("\t\t\t5. Both hot and cold water.\n"); 59 | printf("\t\t\t6. Free internet service.\n"); 60 | printf("\t\t\t7. 24 hours room service.\n"); 61 | printf("\nPress any character to continue:\n"); 62 | 63 | 64 | } 65 | 66 | 67 | void login() { 68 | char uname[20]; 69 | char pass[10]; 70 | 71 | printf("\n ************************** LOGIN FORM ************************** "); 72 | printf(" \n ENTER USERNAME:-"); 73 | scanf("%s", uname); 74 | printf(" \n ENTER PASSWORD:-"); 75 | scanf("%s", pass); 76 | printf(" ********************YOUR LOGIN IS SUCCESSFUL******************* "); 77 | } 78 | 79 | void signup() { 80 | struct CustomerDetails s; 81 | printf("\n Enter Customer Details: "); 82 | printf("\n**************************\n"); 83 | 84 | printf("Enter Name:\n"); 85 | scanf("%s", s.name); 86 | printf("Enter Address:\n"); 87 | scanf("%s", s.address); 88 | 89 | printf("Enter Phone Number:\n"); 90 | scanf("%ld", &s.phonenumber); 91 | printf("Enter Nationality:\n"); 92 | scanf("%s", s.nationality); 93 | printf("Enter Aadhar Card Number for Id proof:\n"); 94 | scanf("%ld", &s.idproof); 95 | printf("Enter Email:\n"); 96 | scanf(" %s", s.email); 97 | printf("Enter Period( no of days):\n"); 98 | scanf("%s", s.period); 99 | printf("Enter Arrival date(dd\\mm\\yyyy):\n"); 100 | scanf("%s", s.arrivaldate); 101 | 102 | } 103 | 104 | typedef enum { 105 | false, 106 | true 107 | } bool; 108 | 109 | void initializeRooms(bool rooms[], int numRooms) { 110 | rooms[1] = rooms[4] = rooms[7] = false; 111 | for (int i = 0; i < numRooms; i++) { 112 | if (i != 1 && i != 4 && i != 7) { 113 | rooms[i] = true; 114 | } 115 | } 116 | } 117 | 118 | void displayAvailableRooms(bool rooms[], int numRooms) { 119 | printf("Available Rooms:\n"); 120 | for (int i = 0; i < numRooms; i++) { 121 | if (rooms[i]) { 122 | printf("Room %d ", i + 1); 123 | } 124 | } 125 | } 126 | 127 | void bookRoom(bool rooms[], int roomNumber) { 128 | if (rooms[roomNumber - 1]) { 129 | rooms[roomNumber - 1] = false; 130 | printf("Room %d has been booked.\n", roomNumber); 131 | } else { 132 | printf("Room %d is already occupied.\n", roomNumber); 133 | } 134 | } 135 | 136 | 137 | void displayMenu() { 138 | int i; 139 | int foodCodes[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; 140 | char foodNames[][30] = {"Burger", "Pizza", "Pasta", "Salad", "Sandwich", "Chapati", "Chicken Briyani", "Mutton Briyani", "Prawn Briyani", "Momos", "Idli", "Dosa", "Naan", "Panner Butter Masala", "Meals"}; 141 | int foodPrices[] = {150, 200, 180, 120, 100, 30, 120, 160, 250, 50, 25, 40, 50, 150, 150}; 142 | printf("============================================\n"); 143 | printf(" MENU CARD\n"); 144 | printf("============================================\n"); 145 | printf("%-5s%-20s%-10s\n", "Code", "Food Item", "Price"); 146 | printf("============================================\n"); 147 | 148 | for (i = 0; i < sizeof(foodCodes) / sizeof(foodCodes[0]); i++) { 149 | printf("%-5d%-20s%-10d\n", foodCodes[i], foodNames[i], foodPrices[i]); 150 | } 151 | 152 | printf("============================================\n"); 153 | } 154 | 155 | void orderFood(int foodCodes[], char foodNames[][30], int foodPrices[]) { 156 | int foodCode, quantity; 157 | int totalCost = 0; 158 | char choice; 159 | 160 | do { 161 | displayMenu(foodCodes, foodNames, foodPrices); 162 | 163 | printf("Enter the food code you want to order: "); 164 | scanf("%d", &foodCode); 165 | if (foodCode < 1 || foodCode > 15) { 166 | printf("Invalid food code. Please enter a valid code.\n"); 167 | continue; 168 | } 169 | 170 | printf("Enter the quantity: "); 171 | scanf("%d", &quantity); 172 | printf("Item: %-20s | Quantity: %-5d | Cost: %-5d\n", foodNames[foodCode - 1], quantity, foodPrices[foodCode - 1] * quantity); 173 | 174 | totalCost += foodPrices[foodCode - 1] * quantity; 175 | 176 | 177 | printf("Do you want to order more items? (Y/N): "); 178 | scanf(" %c", &choice); 179 | 180 | } while (choice == 'Y' || choice == 'y'); 181 | 182 | printf("\nTotal Cost: %d\n", totalCost); 183 | } 184 | int generateOTP() { 185 | srand(time(NULL)); 186 | return rand() % (999999 - 100000 + 1) + 100000; 187 | } 188 | 189 | int main() { 190 | struct CustomerDetails s; 191 | frontpage(); 192 | intro(); 193 | printf("\t\t\t1.signup \t\t\t\n"); 194 | printf("\t\t\t2.Login \t\t\t\n"); 195 | printf("\t\t\t3.exit \t\t\t\n"); 196 | int User_opinion; 197 | scanf("%d",&User_opinion); 198 | 199 | switch(User_opinion){ 200 | case 1: 201 | signup(); 202 | break; 203 | case 2: 204 | login(); 205 | break; 206 | default: 207 | exit(0); 208 | 209 | } 210 | bool rooms[NUM_ROOMS]; 211 | int roomPrices[NUM_ROOMS]; 212 | int daysStayed; 213 | 214 | initializeRooms(rooms, NUM_ROOMS); 215 | 216 | for (int i = 0; i < NUM_ROOMS; i++) { 217 | roomPrices[i] = PRICE_PER_DAY * (i + 1); 218 | } 219 | 220 | int numRoomsToBook; 221 | printf("\nHow many rooms do you want to book? "); 222 | scanf("%d", &numRoomsToBook); 223 | 224 | int roomsBooked[numRoomsToBook]; 225 | int totalBill = 0; 226 | 227 | for (int i = 0; i < numRoomsToBook; i++) { 228 | printf("\nAvailable Rooms:\n"); 229 | displayAvailableRooms(rooms, NUM_ROOMS); 230 | 231 | int roomChoice; 232 | printf("\nEnter the room number to book (%d of %d): ", i + 1, numRoomsToBook); 233 | scanf("%d", &roomChoice); 234 | 235 | if (roomChoice >= 1 && roomChoice <= NUM_ROOMS && rooms[roomChoice - 1]) { 236 | bookRoom(rooms, roomChoice); 237 | roomsBooked[i] = roomChoice; 238 | totalBill += roomPrices[roomChoice - 1]; 239 | } else { 240 | printf("Invalid room number or room already booked. Please try again.\n"); 241 | i--; 242 | } 243 | } 244 | 245 | printf("\nYou have booked the following rooms:\n"); 246 | for (int i = 0; i < numRoomsToBook; i++) { 247 | printf("Room %d - Price per day: $%d\n", roomsBooked[i], roomPrices[roomsBooked[i] - 1]); 248 | } 249 | 250 | printf("\nHow many days are you going to stay? "); 251 | scanf("%d", &daysStayed); 252 | 253 | int totalAmount = totalBill * daysStayed; 254 | printf("\nTotal Amount Due for %d days of stay: $%d\n", daysStayed, totalAmount); 255 | 256 | char extraBooking; 257 | printf("\nDo you want to book extra rooms? (y/n): "); 258 | scanf(" %c", &extraBooking); 259 | 260 | while (extraBooking == 'y' || extraBooking == 'Y') { 261 | 262 | 263 | printf("\nDo you want to book more extra rooms? (y/n): "); 264 | scanf(" %c", &extraBooking); 265 | } 266 | 267 | printf("\nThank you for using our booking service!\n"); 268 | 269 | displayAvailableRooms(rooms, NUM_ROOMS); 270 | int foodCodes[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; 271 | char foodNames[][30] = {"Burger", "Pizza", "Pasta", "Salad", "Sandwich", "Chapati", "Chicken Briyani", "Mutton Briyani", "Prawn Briyani", "Momos", "Idli", "Dosa", "Naan", "Panner Butter Masala", "Meals"}; 272 | int foodPrices[] = {150, 200, 180, 120, 100, 30, 120, 160, 250, 50, 25, 40, 50, 150, 150}; 273 | 274 | char need_food; 275 | printf("\nDo u need food (Y/N): "); 276 | scanf(" %c", &need_food); 277 | 278 | switch (need_food) { 279 | case 'Y': 280 | orderFood(foodCodes, foodNames, foodPrices); 281 | printf("THANK YOU FOR DINING AT OUR RESTAURANT – YOUR PRESENCE IS THE HIGHLIGHT OF OUR DAY"); 282 | break; 283 | case 'N': 284 | printf("THANK YOU FOR VISITING US, LET'S CHEER UP AGAIN SOON..."); 285 | break; 286 | default: 287 | printf("Invalid choice. Please enter 'Y' or 'N'."); 288 | 289 | 290 | } 291 | 292 | int otp = generateOTP(); 293 | printf("\n"); 294 | printf("\nGenerated OTP: %06d\n", otp); 295 | 296 | 297 | return 0; 298 | } 299 | --------------------------------------------------------------------------------