Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to calculate the total cost to enter into a waterpark for a family/group in C++ Ticket rates are listed below kids (Age

Write a program to calculate the total cost to enter into a waterpark for a family/group in C++

Ticket rates are listed below

kids (Age 12 and under)=$ 12.50

Regular( Age between12 -55) =$ 18.25

Seniors (55 and above) = $15.00

Tax = 8 %

Your program should ask the user to enter the total number of members in their group.

User needs to enter the ages for all members

Based on the age it has to calculate and add the cost of each member and display the total cost including tax.

Your program should display the number of tickets for each type and the total cost for the group

After display your program should repeat the process until the user wants to stop.

Write appropriate error messages for invalid entries.

Your program must use

  1. do while loop
  2. Global Constant variable
  3. At least one value returning function
  4. At least one void function
  5. For Loop

Please drop the code and the screenshot of your output

Sample run of the program:

Welcome to our WATERPARK!!!

Please enter the number of members in your group. 7

Please enter the ages for each person in your group. 15 28 11 34 26 60 58

Please pay the total of $115.50 + 8% tax = $ 124.74

And pick up

1 Kid ticket

4 Regular tickets and

2 Senior tickets

Is there another Group? Type Y or N y

Welcome to our WATERPARK!!!

Please enter the number of members in your group. 4

Please enter the ages for each person in your group. 10 28 21 5

Please pay the total of $61.50 + 8% tax = $ 66.42

And pick up

2 Kids tickets

2 Regular tickets and

0 Senior tickets

Is there another Group? Type Y or N n

BYE All Done!

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions