Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to write the bottom part(i.e showing another plan) of this program using C++? Modify the program so that the user can choose which plan(s)

image text in transcribed

How to write the bottom part(i.e showing another plan) of this program using C++?

Modify the program so that the user can choose which plan(s) to show .Setup an integer array to hold the counts of rows of the possible plans: IMPORTANT In this phase, the main function must have an array .Also setup an integer counter to keep and a total-count to keep track of the possible plans (see on the right). Their contents should be setup in part [B] and used in parts [BI and [C] for handling the plans. The program should also check each input value and repeat asking until the input value is valid. (See example 4) For special cases like only 1 possible plan or no possible plan, the program output should follow examples 5A and 5B Reminder: The main function should be short and without any loop. To do the jobs, main should pass the array to other functions for [A] Define the number of seats A] Define the number of seats Input the number of seats (10-99): 24 Input the number of seats (10-99)3 Input the number of seats (10-99) g Input the number of seats (10-99)12 [B] Create seating plan (s) Result: There are 4 possible plans Result: There are 2 possible plans Plan 1: 3 rows x 4 columns Plan 2: 4 rows x 3 columns [C] Display seating plan (s) Input your choice of plan (l-4): 3 Input your choice of plan (l-2): Input your choice of plan (1-2): 3 Input your choice of plan (1-2): 2 Plan (6 rows x 4 columns) s@at seat seat seat seat seat 01 05 09 13 17 21 eat #02 eat #06 eat 10 eat#14 eat 18 eat 22 seat 03 seat 07 seat 11 seat 15 seat 19 seat 23 s@at s@at s@at s@at s@at s@at 04 08 12 16 20 24 Plan (4 rows x 3 columns) seat 01 seat 02 eat #03 seat 04 seat 05 eat #06 seat 07 seat 08 eat #09 seat 10 seat 11 eat #12 Show another plan? Your choice [y]: z Input your choice of plan (1-4):4 Plan (8 rows x 3 columns) Show another plan? Your choice [y]: s Show another plan? Your choice y]: N Show another plan? Your choice yla seat 01 eat #02 seat 03 seat 04 eat #05 seat 06 seat 07 eat #08 seat#09 seat i10 seat 11 seat #12 seat i13 seat 114 seat #15 seat 16 eat 17 seat 18 seat 19 eat #20 seat#21 seat 22 eat 23 seat#24 Press any key to continue -. - Show another plan? Your choice [y]: Thank you for using this program Press any key to continue .. 0-3-2! 1234 3 159371 1470369

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

More Books

Students also viewed these Databases questions