Create a program that tells the user based on the size of their venue space at a
Fantastic news! We've Found the answer you've been seeking!
Question:
Create a program that tells the user based on the size of their venue space at a concert, the maximum number of people allowed inside.
There will be 2 lists one for how many can enter based on underage concert and another larger number based on if its 18+ concert.
The program will compute the airspace in the indoor space by using the formula for a volume: ( width x length x height) C++
- create a class called theVolume; it will include the following:
- private:
- declare width, length, and height as doubles
- public:
- (where you'll list the function prototypes)
- setVenueW
- setVenueL
- setVenueH
- parameters for each will be double
- you'll need these functions to 'get' the inputs from the 'set' functions and return them
- getVenueW
- getVenueL
- getVenueH
- each function will be a constant (meaning that their values should not be changed) so const should be the last item on the prototype line
- list a prototype to return the result of the volume equation (also a constant)
- getVolume
- the main function:
- declare an instance of the Volume class called Venuespace
- declare variables to store the values of width, length, and height
- display a request for the user to input the width the length and the height.
- receive and store the width the length and height input
- call each of the three 'set' functions and pass the appropriate variable to each
- call the function to set the volume for Venuespace and assign it to a double variable
- display the computed Venuespace in a sentence that describes what it represents
- declare a constant value called CAPACITY_UNDER18 which will be .006 just under the other variable declarations"
- multiply the volume for Venuespace times(x) CAPACITY_UNDER18
- this will be the maximum number of people allowed during under 18 concert
- format this number so the decimal is dropped (can't have fractional people!)
- include the appropriate header file
- declare another const called CAPACITY_OVER18, which will be equal to twice the CAPACITY_UNDER18
- multiply the volume for Venuespace times(x) CAPACITY_UNDER18
- this will be the maximum number of people allowed in
- format this number so the decimal is dropped (can't have fractional people!)
- multiply the volume for Venuespace times(x) CAPACITY_UNDER18
- private:
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date: