Answered step by step
Verified Expert Solution
Question
1 Approved Answer
diziler kullanmadan c dili ile yazar msnz c dili ile yazar msnz - Imagine you simulate selling tickets to a concert. There are 4 categories
diziler kullanmadan c dili ile yazar msnz c dili ile yazar msnz - Imagine you simulate selling tickets to a concert. There are 4 categories each having 40 seats. (Level A, B, C, D) - You need a menu based program for managing the ticket sales. - You should do the following operations: Check current available and sold seats at each level Update available seats Update ticket prices Sell a ticket from the requested level (by checking available seat control) Check current cash information Notes: - Initial available seat: - Level A:40 - Level B:40 - Level C:40 - Level D:40 Initial ticket prices: - Level A:100 - Level B:80 - Level C: 60 - Level D:40 Program will continuously get user's request and perform the required operation until the user chooses to Quit. Use the following functions: - printMainMenu0): Prints main menu (as seen in the sample run), inputs user's request and returns it to the calling function. printSeatinformation0: Receives and prints current seat information (as seen in the sample run) printricketPrices0: Receives and prints current ticket prices (as seen in the sample run) printCashInfo(): Receives and prints current cash information (as seen in the sample run) seatControl(): Receives two parameters "seatlnfo" and "numberofsold" if stock is enough returns 1 , if not returns 0 . updatePrices(): Changes seat prices. It receives current ticket price and inputs the new price from user and updates and returns it to the calling function. - sello: It receives the required number of tickets and available seat for the required ticket level as a parameter. It updates and returns the updated available seat to the calling function if there are enough seats and outputs the bill. It outputs a message if the seats cannot be sold. - CalculateBill0: Receives "ticketPrice" and "numberofsold" as parameters, returns ticketPrice x numberofsold and outputs the bill as given in the sample run
diziler kullanmadan c dili ile yazar msnz
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started