Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 (40 points)-Write a program. Submit a file named height.c Amusement parks have minimum heights for their rides. Create a program that adds users

image text in transcribed

Problem 1 (40 points)-Write a program. Submit a file named height.c Amusement parks have minimum heights for their rides. Create a program that adds users to the line of a ride in an amusement park if they meet the minimum height requirement (given in inches) . Create three classes: o An amusement park class o A ride class o Arider class (people riding the rides) It should work with the following main (DO NOT MODIFY-NO CREDIT IF YOU MODIFY): int mainO Rider r1(Yaris", 45); /ame, height in inches Rider r2(49)://height in inches Amusement park a1(3); //3 is the number of rides in the amusement park a1.get ride(1).add_line(r1); //add a rider to the line of a ride Amusement park a2(2); //2 is the number of rides in the amusement park a2.get ride(1).add line(r2); //add a rider to the line of a ride return 0; Possible Sample Run 1 (vour program does not have to match the following exactlv, but ~~~Amusement Park into~~~ Ride 1- Enter minimum ride height and ride name: 40 ride1 Ride 2- Enter minimum ride height and ride name 50 ride2 Ride 3- Enter minimum ride height and ride name 60 ride3 Adding rider to line Amusement Park Info Ride 1- Enter minimum ride height and ride name: 75 ride1 Ride 2- Enter minimum ride height and ride name: 76 ride2 Sorry can't add rider-too short

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 Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions