Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

D Rumaysaa Hotel will celebrate their 10 Anniversary on 8th June 2021. However, the hotel will offer discount only to all customers who book the

image text in transcribed
D Rumaysaa Hotel will celebrate their 10 Anniversary on 8th June 2021. However, the hotel will offer discount only to all customers who book the VIP package room in June 2021. The payment will be based on package type and number of days spent in the hotel. Details charge for each package are shown in the following table. Package Type Package Code Price per night (RM) Single Room S 230.00 Double Room 250.00 Twin Room T 280.00 Figure 1: Standard Package Package Type Package Code Price per night (RM) Discount (%) Deluxe Room D 415.00 10 Mini Suite M 500.00 15 Executive Suite E 750.00 Figure 2: VIP Package As a programmer, you have to write a complete C++ program that will solve the following problem: a) Write a function definition standardPackage () that will receive code of package type and number of nights through its parameter. The function will calculate and return the total price charged for each stay. The charge is calculated based on the details in Figure 1. 20 b) Write a function definition vipPackage () that will receive code of package type and number of nights through its parameter. The function will calculate and return the total price charged for each stay. The charge is calculated based on the details in Figure 2. c) Write the main function that do the following tasks: Ask the user to enter type of package, ('S' for the standard and V for VIP package) as an input. If the users enter 's your program then asked the user to enter the standard code and number of nights they will stay in the hotel. Meanwhile if the users enter "V", the user should enter the VIP package code and number of nights they will stay in the hotel. Use the above functions as defined in (a) and (b) to get the total price charges and display the charges. Display an appropriate message if the user enters an Invalid type of package or package code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago