Cherating Company is running a promotion for its tour packages. It is giving discounts to clients based on the number of people in each package and the duration of stay in Cherating Hotel. Using the information given in the following table, write a C++ program that accepts from the users the number of people per package and the duration of stay, to determine and display the type of promotion package, the discount value, and the total price for each package after discount. Hint: Use your preferred nested selection to solve this problem. Your program should only accept a valid number of people based on the below table. Otherwise, you should display "Invalid entry. Please enter a value between 1-9 people only". Similarly, your program should check the input of the duration of stay within the range given in the table below and display the following message if the input is invalid. "Invalid entry. Duration of stay must be at least 1 and not more than 7”.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Cherating Company is running a promotion for its tour packages. It is giving discounts to clients based on the number of people in each package and the duration of stay in Cherating Hotel. Using the information given in the following table, write a C++ program that accepts from the users the number of people per package and the duration of stay, to determine and display the type of promotion package, the discount value, and the total price for each package after discount.

Hint: Use your preferred nested selection to solve this problem.

  1. Your program should only accept a valid number of people based on the below table. Otherwise, you should display "Invalid entry. Please enter a value between 1-9 people only".
  2. Similarly, your program should check the input of the duration of stay within the range given in the table below and display the following message if the input is invalid. "Invalid entry. Duration of stay must be at least 1 and not more than 7”.

Number of People in the package

Duration of stay

Package

Normal Price

(RM per person)

Discount (%)

1-3

2 days

‘A’

700

4%

 

4 days

'B'

1200

6%

 

6 days

'C'

1800

8%

4-6

2 days

‘D’

650

5%

 

4 days

'E'

1100

7%

 

6 days

'F'

1700

9%

7-9

2 days

‘G’

600

6%

 

4 days

'H'

1000

8%

 

6 days

'I'

1600

10%
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education