Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ in Automatic 0 if these guidelines are not followed: --MAKE SURE YOUR PROGRAM IS PROPERLY INDENTED AND COMMENTED -DO NOT CODE EVERYTHING IN
In C++ in Automatic 0 if these guidelines are not followed: --MAKE SURE YOUR PROGRAM IS PROPERLY INDENTED AND COMMENTED -DO NOT CODE EVERYTHING IN MAIN (MAKE FUNCTIONS AND CLASSES AS APPROPRIATE) -
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 Aride class o A rider class (people riding the rides]) It should work with the following main (DO NOT MODIFY-NO CREDIT IF YOU MODIFY): int main0 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 ra 0 ot hav natch the following exactlv, but Amusement Park Info~ 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. 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 Aride class o A rider class (people riding the rides]) It should work with the following main (DO NOT MODIFY-NO CREDIT IF YOU MODIFY): int main0 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 ra 0 ot hav natch the following exactlv, but Amusement Park Info~ 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 shortStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started