Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this question; to be done in JAVA AP COMPUTER SCIENCE A EXTRA PRACTICE FOR 2D ARRAYS For this set of problems, you

image text in transcribed

image text in transcribed

Need help with this question; to be done in JAVA

AP COMPUTER SCIENCE A EXTRA PRACTICE FOR 2D ARRAYS For this set of problems, you will have the freedom to show evidence of your planning in any way you see fit. We have already covered pseudocode, flowcharts, and truth tables as common methods for planning code prior to writing code. For each of these exercises, develop a plan BEFORE you begin coding. Once you begin coding, be sure to comment your code. You may need to implement multiple methods. If you choose to write pseudocode, you may use the lines of pseudocode as the comments for your code to show how it was translated. 2. A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 1 2 3 4 5 6 7 8 9 10 J 10 10 10 10 10 10 10 10 10 10 H 10 10 10 10 10 10 10 10 10 10 G 10 10 10 10 10 10 10 10 10 10 F 10 10 20 20 20 20 20 20 10 10 E 10 10 20 20 20 20 20 20 10 10 D 10 10 20 20 20 20 20 20 10 10 C 20 20 30 30 40 40 30 30 20 20 B 20 30 30 40 50 50 40 30 30 20 A 30 40 50 50 50 50 50 50 40 30 Write a program that prompts users to pick either a seat (formatted by row #, then seat #, e.g. A 5) or a price. Mark sold seats by changing the price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price. Reprint the chart with the updated selection and ask the user if they would like another seat. Continue to sell seats until it is sold out or the user chooses to end/exit the program (provide an appropriate sentinel)

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

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions