Question: 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

 Problem 1 (40 points)-Write a program. Submit a file named height.c

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!