You are asked to write a C program to manage 10 hotel rooms using C structures...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are asked to write a C program to manage 10 hotel rooms using C structures to develop a hotel management system. Every room should have the following details: room number, status (1 for reserved and 0 for vacant), customer details (username, last name, email address, address, and telephone number), check-in date, and check-out date. Your code should have a menu for these services: Transaction type?: B or b input all customer data User input Check in and check out date Transaction type?: V or v room number?: room number Transaction type?: E or el room number?: room number Transaction type?: C or c room number?: room number Transaction type?: R or r Transaction type?: E or e Room 1 2 3 4 5 6 7 8 9 10 Functions Book a room, user can book a room. Room should be vacant otherwise a message says "Room already booked" View customer details, prints the all-customer details in specified room. The following is the content of the hotel.txt file. Edit customer details, user can only edit information in booked room Check-out is only allowed if a room is booked. This function should return the status of the room to vacant. Additionally, it should print the user's bill for that room, calculated based on the number of days stayed (using a day rate of $50) between the check-in and check-out dates Print report. a user can print the information on the to file called hotel.txt Exit program Check-in date 4/30/2023 04/29/2023 Number of days 2 1 status Booked Vacant Vacant Vacant Booked. Vacant Vacant Vacant Vacant Vacant You are asked to write a C program to manage 10 hotel rooms using C structures to develop a hotel management system. Every room should have the following details: room number, status (1 for reserved and 0 for vacant), customer details (username, last name, email address, address, and telephone number), check-in date, and check-out date. Your code should have a menu for these services: Transaction type?: B or b input all customer data User input Check in and check out date Transaction type?: V or v room number?: room number Transaction type?: E or el room number?: room number Transaction type?: C or c room number?: room number Transaction type?: R or r Transaction type?: E or e Room 1 2 3 4 5 6 7 8 9 10 Functions Book a room, user can book a room. Room should be vacant otherwise a message says "Room already booked" View customer details, prints the all-customer details in specified room. The following is the content of the hotel.txt file. Edit customer details, user can only edit information in booked room Check-out is only allowed if a room is booked. This function should return the status of the room to vacant. Additionally, it should print the user's bill for that room, calculated based on the number of days stayed (using a day rate of $50) between the check-in and check-out dates Print report. a user can print the information on the to file called hotel.txt Exit program Check-in date 4/30/2023 04/29/2023 Number of days 2 1 status Booked Vacant Vacant Vacant Booked. Vacant Vacant Vacant Vacant Vacant
Expert Answer:
Answer rating: 100% (QA)
C Program to Manage 10 Hotel Rooms C include include include Structure to store room details typedef struct room int roomnumber int status 1 for reserved 0 for vacant char customername50 char customeremail50 char customeraddress100 char customerphone15 char checkindate15 char checkoutdate15 room Function to display the menu void displaymenu printfHotel Management System printf printf1 Book a room printf2 Check inout printf3 View customer details printf4 Edit customer details printf5 Check out printf6 Print report printf7 Exit printf printfEnter your choice Function to book a room void bookroomroom rooms int roomnumber printfEnter the room number you want to book scanfd roomnumber if roomsroomnumber 1status 1 printfRoom already booked return roomsroomnumber 1status 1 printfEnter customer ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
You've just joined the investment banking firm of Dewey, Cheatum, and Howe. They've offered you two different salary arrangements. You can have $7,500 per month for the next three years, or you can...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Staywell finds and manages accommodation for owners of student accommodation in the Seattle Area. The company rents out and helps to maintain 1-5-bedroom properties located in two main areas in the...
-
f is continuous, but not necessarily differentiable, has domain [0, 6], reaches a maximum of 6 (attained when x = 5), and a minimum of 2 (attained when x = 3). Additionally, x = 1 and x = 5 are the...
-
1. Spread of AIDS Suppose a country is so devastated by the AIDS epidemic that its population decreases by 0.5% each year for a 4-year period. If the population was originally 10 million, what is the...
-
The director of marketing for Starr Computer Co., Megan Hewitt, had the following discussion with the company controller, Cam Morley, on July 26 of the current year: Megan: Cam, it looks like Im...
-
What are hedges? Give five hedges that apply to the linguistic variables you gave in answer to question 18.3. DATA IN QUESTION 18.3 What is a linguistic variable? Give 10 examples of linguistic...
-
Four economic classifications of mergers are (1) horizontal, (2) vertical, (3) conglomerate, and (4) congeneric. Explain the significance of these terms in merger analysis with regard to (a) the...
-
Solve the Questions. 1. Describe how a bank makes money, what the do for their customers to earn that money, and how it could be improved? 2. Compare banks with the alternatives and determine what is...
-
A company's debt is given by a bond that will mature in two years. After two years the company will terminate all activity. The company unlevered equity value in two years can be $17 millions with a...
-
In statistical measurement of the impact of microfinance, an enterprise may be used as a unit of assessment. (i) Illustrate and explain a conceptual framework that is suitable for such an analysis....
-
Does it matter what we call a project?
-
What are the impacts at a project level of poor strategy processes?
-
Consider the definitions of project provided by each of the professional bodies. What are the similarities and differences?
-
Write a commentary on the Bodies of Knowledge, and how they could relate to your own work environment both now and in the future.
-
Consider the last Olympics and Paralympics and identify the list of major stakeholders. How did the Games project perform for each of these stakeholders?
-
A chicken farmer bought 2330 baby chicks. Of this number, 1398 lived to maturity. What percent loss was experienced by the chicken farmer?
-
Briefly discuss the implications of the financial statement presentation project for the reporting of stockholders equity.
-
David Soul, a not-for-profit organization that provides healthcare to the elderly, has the following activity in the purchases account: The budgeted purchases for the year, as approved by the board...
-
Compare the needs of the users of a financial statement of a government organization with those of a membership-based not-for-profit organization.
-
Why would a company present its financial statement in a currency that is different than its functional currency?
-
Explain the procedure for drawing Mohrs circle under complex stresses.
-
Derive and expression for principal stresses in a body subjected to complex state of stress.
-
Defined principal stresses and principal planes.
Study smarter with the SolutionInn App