Giter Club home page Giter Club logo

hotelmgmtsystem's Introduction

C-based Hotel Management System

About

A POSIX-compliant C-based hotel management system supporting multiple concurrent requests for placing orders, calculating income, assigning waiters, and facilitating efficient management among admin, hotel manager, customers, and staff.

Key Features

  • Can support 10+ concurrent table processes with 5+ customers in the system
  • POSIX compliant IPC via pipes - named and ordinary
  • Concurrent execution and assignment of tables to new customers
  • Distinct table-waiter pairs and admin-hotelmanager communication via shared memory
  • Hotel manager is responsible for overseeing the total earnings, calculating the total earnings of all the waiters and handling termination

Getting started

Navigating to root directory

cd /path/to/the/root

Compiling (GCC compiler) into executable files

gcc -o table.out table.c
gcc -o waiter.out waiter.c
gcc -o admin.out admin.c
gcc -o hotelmanager.out hotelmanager.c

Running executable files

table.out
waiter.out
admin.out
hotelmanager.out

How to run?

For table process

Upon executing the table process, enter a positive integer when prompted :

Enter Table Number:
Enter Number of Customers at Table:

The table process will read the menu from the pre-created menu.txt file, and each customer process orders when prompted :

Enter the serial number(s) of the item(s) to order from the menu. Enter -1 when done:

For waiter process

Upon executing the waiter process, enter a positive integer when prompted :

Enter Waiter ID:

Once the correct order is received by the waiter process, it calculates the total bill amount of the table and displays :

Bill Amount for Table X: Y

For hotel manager process

Upon executing the hotel-manager process, enter a positive integer when prompted :

Enter the Total Number of Tables at the Hotel:

On receiving intimation of termination from admin process and only when there are no customers at the hotel, the hotel manager process calculates the total earnings :

Total Earnings of Hotel: X
Total Wages of Waiters: Y
Total Profit: Z

For admin process

Admin process will keep running along with the table, customer, waiter and hotel manager processes and only one instance of this program is executed when prompted :

Do you want to close the hotel? Enter Y for Yes and N for No.

hotelmgmtsystem's People

Contributors

lazybug19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.