Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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:

image text in transcribed

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 Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago