Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Situation Your friend has received an internship offer from an s ement park. His/her task will involve standing at the entrance with a tablet counting
Situation Your friend has received an internship offer from an s ement park. His/her task will involve standing at the entrance with a tablet counting the number of people entering the park. Your tasks to write a C program which will be loaded on the table to assist your friend. The program will have an array named patronTypes that can store up to 500 integer values entered by the userFive types of patrons are to be entitled and entered into the way 1, 2, 3, 4 and 5s to represent people entering the park 1 represents an infant (0 - 3 years old) 2 represents a child (4-12 years old), 3 represents a teenager, 4 represents adult male and represents adult female. No other integer value should be accepted a valid integer, and data entry should stop when a negative value is entered Your program should count the number of each 1,2,3,4 and in the array, display a list of how many infants, children, teenagers, adult males and adult females who entered the park and the total entrance fees collected during a particular shift. (a) Document your Steps 1 & 2 on the attached sheet of paper, and (b) Create a C++ program (parkPatrons 2) for this problem on your class Thumb Drive. You will transfer your project folder to the course Thumb Drive during the class on the due date. Use the following numbers as input to test your program: 1, 3, 2, 5, 4, 2, 2,4,5,5, 3, 3, 2, 2, 5, 6, 1, 1,3,2,2,4,5, 3,5, 1, 1, 2,5, 3, 3,-3. Entrance Fees per person: Infant (0 - 3 years old): $0 Children (4 - 12): Teenagers: Adults (Male & Female): $22 For the above input the following should be displayed: $7 $15 Date: 04/16/2019 Number of Infants - 5 Number of Children - 8 Number of Teenagers - 7 Number of Adult Males - 3 Number of Adult Females = 7 Total Number of Patrons = Total Fees Collected = 30 $381
Step 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