Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine that you are creating a ticket reservation system. A section is rectangular ( each row has the same number of seats ) There are

Imagine that you are creating a ticket reservation system. A section is rectangular (each row has the same number of seats) There are multiple rows. An example might be 16 seats in a row and there are 8 rows. It can be larger if you want but not smaller.
1)You want the operator (user) to be able to put in the number of seats, and then the seats best possible seats will be assigned. Make sure to give clear prompts to the user so they know what to enter.
2) Assume that the party wants to sit consecutively in the same row. Assume random groups of 1-8
3)Try to assign the seats as efficiently as possible, minimizing gaps.
4) Provide some output to your user. An acknowledgement of where the seats are or you can print out your seat map, or both.
Example: You have been issued seats 1-5 in row 1.
some Steps to complete it
1. Array 16 x 8
2. Get party number
3. Variable for each row seat number then deduct.
4. If party was greater than available seats then full.
5. Cancel rows when they are full.
6. If you run out of seats, ask if you want to flow into next row.
7. If they dont want to move them to the next row.
8. Loop through each row.
9. Boolean 0 and 1 to indicate occupied seat.
Can you help me write one example programing inC++for meto look atit based on the required above but write it simple for college student and just use 2D arrays and give me some guidance to done it

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Identify the three common categories of persuasive messages. [LO-3]

Answered: 1 week ago

Question

What is the AIDA model, and what are its limitations? [LO-2]

Answered: 1 week ago