Question
Coded in C++ Scenerio You work for a concert promoter. Since some of the patrons of past events have been complaining about the moshers in
Coded in C++ Scenerio
You work for a concert promoter. Since some of the patrons of past events have been complaining about the moshers in the mosh pit the promoter has given you the job to determine the maximum number of moshers in the mosh pit so that a reserved area can be created for the moshers. The number of moshers that can fit into a mosh pit depends on the pit size, the average size of a mosher, the separation between the moshers, and the north, south, east, and west thickness of the mosh pit barricade to contain the moshers. Write a program that calculates the number of moshers that will fit into the mosh pit based on the following input from the user:
The length and width, in feet, of the mosh pit. Assume these are the maximum (outside) dimensions.
The thickness of the north, south, east, and west sides of the barricade
The separation between moshers (and a barricade side if applicable)
The average size of the mosher
To get the space between moshers prompt the user for a separation value:
A separation of A or a means 2.5 foot distance between moshers
A separation of B or b means 1.5 foot distance between moshers
A separation of C or c means 0.5 foot distance between moshers
A separation of Q or q means exit the program (return the number zero)
Any other character means exit the program (return the number one)
NOTE: Use a char variable type for the prompt response.
2 To get the average size of a mosher (assume all moshers in the mosh pit will be the same size):
A mosher size of L or l means each mosher takes up a 1.5 foot by 1.5 foot space
A mosher size of XL or xl means each mosher takes up a 2.5 foot by 2.5 foot space
A mosher size of XXL or xxl means each mosher takes up a 3.5 foot by 3.5 foot space
A mosher size of Q or q means exit program (return the number zero)
Any other string means exit the program (return the number one)
NOTE: Use a string data type for the prompt response.
To ease your calculations assume that the moshers (depicted below) are initially arranged in rows and columns in a grid like fashion and that the distance between an end mosher and the barricade is the separation distance.
Also even though the moshers are not square assume they take up a square space.
Finally the program should run in a continuous loop (unless users press a key to exit) Example of expected output:
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