A concert hall has three seating categories: Orchestra, Main floor, and Balcony.
ID: 3630577 • Letter: A
Question
A concert hall has three seating categories: Orchestra, Main floor, and Balcony. Orchestra seats are $25. Main floor seats are $30, and balcony seats are $15. The manager wants an application that allows him to enter the nuber of tickets sold in each seating category. The application should calculate the amount of revenue generated by each seating category, as well as the total revenue.a. List the output and input items, as well as any proccessing items, then create an appropriate algorithm.
b. Create a new visual basic Windows application. Assign the name concert Project to the project. Assign the name Concert solution to the solution. Save the application in the ClearlyVB/Chap07 folder. Change the name of the form file on your disk to frmMain.vb. If necessary, change form's name tofrmMain.
c. Create an appropriate interface. Include an Exit button. Code the Exit button's Click event procedure and the problem's algorithm. Save the solution. Desk-check the programe using your own sample data.
d. Start and then test the application. Stop the application, then close the solution.
Explanation / Answer
#include using namespace std; int main() { //declare variables int ORCHESTRA_SEAT_PRICE; int orchestraSeatsold; int MAIN_FLOOR_SEAT_PRICE; int mainFloorseatSold = 0; int BALCONY_SEAT_PRICE; int balconySeatsold = 0; int totalOrchestrarevenue = 0; int totalMainfloorRevenue = 0; int totalBalconyrevenue = 0; int totalRevenue = 0; //Enter the input cout ORCHESTRA_SEAT_PRICE; cout orchestraSeatsold; cout MAIN_FLOOR_SEAT_PRICE; cout mainFloorseatSold; cout BALCONY_SEAT_PRICE; cout balconySeatsold; //calculates the Total orchestra revenue totalOrchestrarevenue = ORCHESTRA_SEAT_PRICE * orchestraSeatsold; //calculates the Total main floor revenue totalMainfloorRevenue = MAIN_FLOOR_SEAT_PRICE * mainFloorseatSold; //calculates the Total balcony revenue totalBalconyrevenue = BALCONY_SEAT_PRICE * balconySeatsold; //calculates the Total revenue totalRevenue = totalOrchestrarevenue + totalMainfloorRevenue + totalBalconyrevenue; //display the Total orchestra revenue, Total main floor revenue, Total balcony revenue, total revenue coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.