Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with this, program is to be in JAVA, make sure it is simple as possible, this exercise is focusing on 2D

Can someone help me with this, program is to be in JAVA, make sure it is simple as possible, this exercise is focusing on 2D arrays. Not looking for a complex or fancy solution. (Should only really be importing scanner), Thanks!

image text in transcribedimage text in transcribed

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

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

Determine the amplitude and period of each function.

Answered: 1 week ago

Question

Describe new developments in the design of pay structures. page 475

Answered: 1 week ago