Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java please, full detailed solution with comments and screenshots of code and output. Please provide an explanation of approach and time/space complexity and why

In Java please, full detailed solution with comments and screenshots of code and output. Please provide an explanation of approach and time/space complexity and why for each. image text in transcribedimage text in transcribed

Movie Theater Seating Challenge - 2020 Overview [[ SCREEN ]] Implement an algorithm for assigning seats within a movie theater to fulfill reservation requests. Assume the movie theater has the seating arrangement of 10 rows x 20 seats, as illustrated to the right. A SSSSSSSSSSSSSSSSSSSS B SSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS Your homework assignment is to design and write a seat assignment program to maximize both customer satisfaction and customer safety. For the purpose of public safety, assume that a buffer of three seats and/or one row is required. D SSSSSSSSSSSSSSSSSSSS E SSSSSSSSSSSSSSSSSSSS Input Description F SSSSSSSSSSSSSSSSSSSS G SSSSSSSSSSSSSSSSSSSS II 33333333333333333333 You will be given a file that contains one line of input for each reservation request. The order of the lines in the file reflects the order in which the reservation requests were received. Each line in the file will be comprised of a reservation identifier, followed by a space, and then the number of seats requested. The reservation identifier will have the format: R####. See the Example Input File Rows section for an example of the input rows. I SSSSSSSSSSSSSSSSSSSS J SSSSSSSSSSSSSSSSSSSS 1 20 Output Description 1 20 Output Description Example Input File Rows: The program should output a file containing the seating assignments for each request. Each row in the file should include the reservation number followed by a space, and then a comma-delimited list of the assigned seats. See the Example Output File Rows section for an example of the output file content. RO01 2 ROO24 ROO3 4 Requirements R004 3 Implement your solution using a programming language that you are comfortable with. We work in Java, but we are more interested in understanding how you think than in language specifics. Example Output File Rows: The solution and tests should build and execute entirely via the command line. R001 11, 12 R002 F16,F17, F18,F19 The command for executing the program should accept the complete path to the input file as an argument and should return the full path to the output file. ROO3 A1, A2, A3, A4 R004 J4, J5, J6 Create a README file that documents your assumptions and includes instructions for building the solution and executing the tests. We value your time, and anticipate that you will limit your investment in this exercise to 3 - 4 hours. Feel free to make trade-offs to save time, but consider how you would evolve your code to an ideal implementation. Your solution will be reviewed by engineers that you will be working with if you join the team. We are interested in seeing your software design, coding, and testing skills. Movie Theater Seating Challenge - 2020 Overview [[ SCREEN ]] Implement an algorithm for assigning seats within a movie theater to fulfill reservation requests. Assume the movie theater has the seating arrangement of 10 rows x 20 seats, as illustrated to the right. A SSSSSSSSSSSSSSSSSSSS B SSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS Your homework assignment is to design and write a seat assignment program to maximize both customer satisfaction and customer safety. For the purpose of public safety, assume that a buffer of three seats and/or one row is required. D SSSSSSSSSSSSSSSSSSSS E SSSSSSSSSSSSSSSSSSSS Input Description F SSSSSSSSSSSSSSSSSSSS G SSSSSSSSSSSSSSSSSSSS II 33333333333333333333 You will be given a file that contains one line of input for each reservation request. The order of the lines in the file reflects the order in which the reservation requests were received. Each line in the file will be comprised of a reservation identifier, followed by a space, and then the number of seats requested. The reservation identifier will have the format: R####. See the Example Input File Rows section for an example of the input rows. I SSSSSSSSSSSSSSSSSSSS J SSSSSSSSSSSSSSSSSSSS 1 20 Output Description 1 20 Output Description Example Input File Rows: The program should output a file containing the seating assignments for each request. Each row in the file should include the reservation number followed by a space, and then a comma-delimited list of the assigned seats. See the Example Output File Rows section for an example of the output file content. RO01 2 ROO24 ROO3 4 Requirements R004 3 Implement your solution using a programming language that you are comfortable with. We work in Java, but we are more interested in understanding how you think than in language specifics. Example Output File Rows: The solution and tests should build and execute entirely via the command line. R001 11, 12 R002 F16,F17, F18,F19 The command for executing the program should accept the complete path to the input file as an argument and should return the full path to the output file. ROO3 A1, A2, A3, A4 R004 J4, J5, J6 Create a README file that documents your assumptions and includes instructions for building the solution and executing the tests. We value your time, and anticipate that you will limit your investment in this exercise to 3 - 4 hours. Feel free to make trade-offs to save time, but consider how you would evolve your code to an ideal implementation. Your solution will be reviewed by engineers that you will be working with if you join the team. We are interested in seeing your software design, coding, and testing skills

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

Students also viewed these Databases questions

Question

=+ f. instituting laws against driving while intoxicated

Answered: 1 week ago