Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program that determines whether a college class room is in violation of fire law regulations regarding the maximum room capacity. The program will

write a program that determines whether a college class room is in violation of fire law regulations regarding the maximum room capacity. The program will have constants for the maximum room capacity and have the user choose the class room from a list, such as 1) John Hall and 2) Merry Then finally have the user input the number of people to attend the class. If the number of people is less than or equal to the maximum room capacity, the program announces through a message that it is legal to hold the class and tells the percentage of seats still available. If the number of people exceeds the maximum room capacity, the program announces through a message that the class cannot be held as planned.

Here are the constants for the program:

const int JO312 = 42; (this is menu choice John Hall room 312)

const int ME41 = 44; (this is menu choice Merry 41)

const int GE133 = 38; (this is menu choice George Hall room 133)

const int Wi111 = 75; (this is menu choice Will Hall room 111)

const int AN30 = 30; (this is menu choice Andy Hall room 30)

Calculate the overall percentage (sum of the total attendees divided by the total seats possible) and output it as a percentage. Also, determine from the percentage the status as follows:

high: 70%-100%; average: 30%-69.99%; low: 10%-29.99%; minimal: Less than 10%.

This should display in the message as seen below.

Match your program with the sample input and output (use proper formatting) as shown below:

Enter the room for your class (1-5):

(assume user enters 4)

Enter the number of attendees: 72

It is legal to hold class and there is 4% minimal capacity remaining

please answer this in c++.

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions

Question

=+5.14. Let f (x) be n2x or 2n -n2x or 0 according as 0 5x

Answered: 1 week ago