Question: write a C program that manages rooms in a small hotel that has 5 single rooms (no kids allowed), 10 double rooms (a max of

write a C program that manages rooms in a small hotel that has 5 single rooms (no kids allowed), 10 double rooms (a max of 1 kid is allowed) and 3 studio rooms (a max of 3 kids allowed).
The price for a single room is 350 MAD
o Single rooms are numbered oddly from 1 to 9
The price of a double room 500 MAD
o Double rooms are numbered evenly from 2 to 20
The price of a studio room 700 MAD
o Studio rooms numbered 33, 44, 55 respectively
An extra 50 MAD is applied for every kid
Important points you need to consider during the implementation:
o The files that you will used in this project are for output only the rest of the operations should be carried in the arrays corresponding to room type (you need to use three arrays)
Except for Hotel earning
o You need to use three structures for every room type:
Single room: status(F if Full E if Empty), check in date(DD-MM- YYYY), name of the client, identity number(CIN), room number, and number of night to spend
Double room: status(F if Full E if Empty),check in date, name of the client1, name of client 2, client 1 identity number(CIN), client 2 identity number, room number, status_kid (1 if accompanied with a kid 0 otherwise), and number of night to spend
Studio room: status(F if Full E if Empty), check in date, name of the client1, name of client 2, client 1 identity number(CIN), client 2 identity number, room number, number of kids and the number of night to spend
o Your program should display the following menu with every option implemented with a user defined function (except for quit). Please note that you must respect the concept of input/output argument and local variables
1. Checkavailabilityofaroomtype
2. Checkin
3. Checkout
4. HotelEarning
5. Quit
- Initially you start your code with setting all rooms status to empty and every room must have its assigned room number
- Check in is used to book a room (if available) for a person. Besides from check in, the hotel manager would like to keep a record of people visited the hotel so for every person checked in you need to add the needed information to a text file called history.txt (input chosen are just examples):
Client Name: Hannah Sanders Partner: None
Room type: Single

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!