Duyong Beach Resort is a contemporary hotel that offers rooms with private balconies that face the sea. Your company has obtained a contract from Duyong Beach Resort to design, maintain and update their online reservation system. All room's prices are subjected to tax and service charge. Therefore, total room price must include 6% of tax and 10% of service charge. Table 1 lists price per night, tax, and service charge for all type of rooms. Standard (S) Deluxe (D) Family (F) Room Type ● (a) float calculate_basicPrice (char roomType, int night) ● You have been assigned to create and implement this task using C program. You have been instructed to include the following functions: Table 1: List of Price for All Rooms Price per Night Tax Charge RM 230.00 RM 300.00 RM 420.00 accept roomType and reservation duration (night) from main function calculates basic room price for number of night(s) entered according to Table 1 return basic room price to main function (b) void calculate_charges (float basicPrice, float *tax, float *serviceCharge) accept basicPrice value (as calculated in function (a)) from main function calculates 6% tax from the basic room price and assigned the value to tax calculates 10% service charge from the basic room price and assigned the value to service Charge The program output should be as follows: (c) void print_totalPrice (char roomType, int night, float basicPrice, float tax, float serviceCharge) accept roomType, reservation duration (night), basicPrice, tax, and serviceCharge from main function. List of rooms: S Standard D Deluxe F - Family calculate total price of reservation display roomType, reservation duration (night), basicPrice, tax, service Charge and total price Welcome to Duyong Beach Resort Reservation System Reservation Details: Type of room: S Number of night (s): 2 Basic price: RM 460.00 Tax: RM 27.60 Please enter type of room: S Please enter number of night (s): 2 Service charge: RM 46.00 Total price: RM 533.60 6% 6% 6% Do you want to enter new Reservation? Y Reservation Details: Type of room: D Number of night (s): 1 Please enter type of room: D Please enter number of night (s): 1 Basic price: RM 300.00 Tax: RM 18.00 =================== Service charge: RM 30.00 Total price: RM 348.00 Service Charge 10% 10% 10% |K Do you want to enter new Reservation? n 13

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Duyong Beach Resort is a contemporary hotel that offers rooms with private balconies that face the
sea. Your company has obtained a contract from Duyong Beach Resort to design, maintain and update
their online reservation system. All room's prices are subjected to tax and service charge. Therefore,
total room price must include 6% of tax and 10% of service charge. Table 1 lists price per night, tax,
and service charge for all type of rooms.
(b)
Room Type
Standard (S)
Deluxe (D)
Family (F)
(c)
(a) float calculate_basicPrice (char roomType, int night)
●
You have been assigned to create and implement this task using C program. You have been instructed
to include the following functions:
Table 1: List of Price for All Rooms
Price per Night
Tax Charge
RM 230.00
RM 300.00
RM 420.00
accept roomType and reservation duration (night) from main function
calculates basic room price for number of night(s) entered according to Table 1
return basic room price to main function
void calculate_charges (float basicPrice, float *tax, float *serviceCharge)
accept basicPrice value (as calculated in function (a)) from main function
calculates 6% tax from the basic room price and assigned the value to tax
calculates 10% service charge from the basic room price and assigned the value to
service Charge
The program output should be as follows:
List of rooms:
S Standard
D Deluxe
F - Family
void print_totalPrice (char roomType, int night, float basicPrice, float tax, float serviceCharge)
accept roomType, reservation duration (night), basicPrice, tax, and service Charge
from main function
calculate total price of reservation
display roomType, reservation duration (night), basicPrice, tax, service Charge and
total price
Welcome to Duyong Beach Resort Reservation System
Please enter type of room: S
Please enter number of night (s): 2
Reservation Details:
Type of room: S
Number of night (s): 2
Basic price: RM 460.00
Tax: RM 27.60
Service charge: RM 46.00
Total price: RM 533.60
6%
6%
6%
Do you want to enter new Reservation? Y
Please enter type of room: D
Please enter number of night (s): 1
Reservation Details:
Type of room: D
Number of night (s): 1
Basic price: RM 300.00
Tax: RM 18.00
Service Charge
10%
10%
10%
Service charge: RM 30.00
Total price: RM 348.00
Do you want to enter new Reservation?
n
Transcribed Image Text:Duyong Beach Resort is a contemporary hotel that offers rooms with private balconies that face the sea. Your company has obtained a contract from Duyong Beach Resort to design, maintain and update their online reservation system. All room's prices are subjected to tax and service charge. Therefore, total room price must include 6% of tax and 10% of service charge. Table 1 lists price per night, tax, and service charge for all type of rooms. (b) Room Type Standard (S) Deluxe (D) Family (F) (c) (a) float calculate_basicPrice (char roomType, int night) ● You have been assigned to create and implement this task using C program. You have been instructed to include the following functions: Table 1: List of Price for All Rooms Price per Night Tax Charge RM 230.00 RM 300.00 RM 420.00 accept roomType and reservation duration (night) from main function calculates basic room price for number of night(s) entered according to Table 1 return basic room price to main function void calculate_charges (float basicPrice, float *tax, float *serviceCharge) accept basicPrice value (as calculated in function (a)) from main function calculates 6% tax from the basic room price and assigned the value to tax calculates 10% service charge from the basic room price and assigned the value to service Charge The program output should be as follows: List of rooms: S Standard D Deluxe F - Family void print_totalPrice (char roomType, int night, float basicPrice, float tax, float serviceCharge) accept roomType, reservation duration (night), basicPrice, tax, and service Charge from main function calculate total price of reservation display roomType, reservation duration (night), basicPrice, tax, service Charge and total price Welcome to Duyong Beach Resort Reservation System Please enter type of room: S Please enter number of night (s): 2 Reservation Details: Type of room: S Number of night (s): 2 Basic price: RM 460.00 Tax: RM 27.60 Service charge: RM 46.00 Total price: RM 533.60 6% 6% 6% Do you want to enter new Reservation? Y Please enter type of room: D Please enter number of night (s): 1 Reservation Details: Type of room: D Number of night (s): 1 Basic price: RM 300.00 Tax: RM 18.00 Service Charge 10% 10% 10% Service charge: RM 30.00 Total price: RM 348.00 Do you want to enter new Reservation? n
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY