Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this program the user will enter the following information for attractions to visit at Walt Disney World: ** Name of Attraction ** Wait Time

In this program the user will enter the following information for attractions to

visit at Walt Disney World:

** Name of Attraction

** Wait Time

The information the user enters must be stored in two parallel arrays (one array

for the attraction name and another for the wait time). The user is in control of

how many attractions to enter (up to a MAX of 25 rides).

In addition to displaying the attraction/wait time chart, the program also needs to:

- determine which attraction has the shortest wait and display the name and wait time for it

- calculate the average wait time per attraction

To complete this exam, it is necessary to write a program that matches the

Sample Output (shown at the bottom) using the proper techniques taught in this course.

Remember that each part of this exam is worth points, so be sure to complete everything

you know how to do as quickly as you can.

*/

#include

#include

#include

using namespace std;

//------------------------------------------------------------------------------

int main()

{

/* create a program that produces the Sample Output shown at the bottom.

You MUST:

- Write a solution that can handle any number of rides (up to the MAX) and must handle completely different types of ride

and wait time entries. A hard coded solution that only handles THIS Sample Output will have a substantial amount of points deducted

- Using parallel arrays is necessary and essential to a correct solution

- Items in the Sample Output on a line that come after a colon (:) are entered by the user

- Make sure the user is not allowed to go past the MAX size of the arrays (including not asking the user if they want to go

again if the MAX has been reached)

- Be sure to keep track of the index of the location of the ride with the shortest wait time so the details of that ride can

later be retrieved and reported on

- Use the most appropriate type of loop for each situation, there is ALWAYS a best choice

- Errors can occur when the user enters the wait time or whether to go again, NOT only where shown in the Sample

- Assume the user makes no errors while entering the attraction name

- Be sure to perform user input validation on the entries for wait time to make sure they are

in the range 0 to 600.

- Be sure to perform user input validation when the user enters 'y' or 'n' for whether to go again (capital letters

must also be accepted)

- Use constant(s) if/where appropriate

- At the end, report the details of the project the user worked on most

*/

//

return 0;

}

/* Sample Output

Welcome to Walt Disney World!

Please enter the attractions you plan to visit and their wait times.

Ride #1 Info

Attraction Name: Rock and Roller Coaster

Wait time (in minutes): 80

Do you want to enter info for another attraction (y/n): x

Enter another ride (must be y/n): 7

Enter another ride (must be y/n): Y

Ride #2 Info

Attraction Name: 7 Dwarfs Mine Train

Wait time (in minutes): -1

STOP: Wait times must be 0 to 600 minutes. Try again: 130

Do you want to enter info for another attraction (y/n): y

Ride #3 Info

Attraction Name: Star Wars Rise of the Resistance

Wait time (in minutes): 5000

STOP: Wait times must be 0 to 600 minutes. Try again: 500

Do you want to enter info for another attraction (y/n): Y

Ride #4 Info

Attraction Name: It's a Small World

Wait time (in minutes): 0

Do you want to enter info for another attraction (y/n): y

Ride #5 Info

Attraction Name: Expedition Everest

Wait time (in minutes): 22

Do you want to enter info for another attraction (y/n): N

Wait

Time

Ride(mins)

=============================================

Rock and Roller Coaster80

7 Dwarfs Mine Train130

Star Wars Rise of the Resistance500

It's a Small World0

Expedition Everest22

Shortest wait time is: It's a Small World (0 minutes).

Average Wait Time (per attraction): 146.40 minutes.

Press any key to continue . . .

*/

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions