Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

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!)

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

theVolumecpp include include using namespace std class th... 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

Microsoft Visual C# An Introduction to Object-Oriented Programming

Authors: Joyce Farrell

7th edition

978-1337102100

More Books

Students also viewed these Programming questions