Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( only need to do the even version ) Use C + + to write a program to calculate the total fee of booking a
only need to do the even version Use C to write a program to calculate the total fee of booking a meeting room. The fee calculation must
take into account the duration of the meeting, the number of attendees, and apply differential
pricing for peak hours and holidays. The program should accept the following user inputs in
exact order given below:
Number of persons attending the meeting
Start time of the booking an hour value in hour format
End time of the booking an hour value in hour format
Whether the booking date is a holiday a character or
Whether the booking is made by a student a character or
The program then calculates and prints the final booking fee according to the charging table
and the charging rules provided below.
Charging Table in dollars
In this question, determine you should use either the odd or even version of this question by
referring to the digit of your student ID number. For example, A uses even
version.
Charging Rules
Input for the number of persons is always positive.
The start time and end time of the booking are always between and and the end time
is always larger than the start time ie the minimum booking duration is one hour
If the booking date is a holiday, a surcharge on the fee per hour is added.
If the booking is made by a student, a discount on the final fee will be applied.
If the booking time falls between peak hours, for the booking hours during the peak hours,
a surcharge on the fee per hour is added.
Peak hours for ODD version: Peak hours for EVEN version:
If the booking duration is equal to or exceeds hours, a discount on the final fee will
be applied.
The final fee is calculated and displayed after all user inputs are received. Its value should be
displayed formatted to two decimal places.
IMPORTANT NOTE: You need to follow all text and order as shown in the sample display.
There should be NO prompt messages and NO additional blank lines in the output. DO NOT
add extra text in the output which will be considered as incorrect in marking.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started