Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ SCREEN 11 A 88888888888888888888 B SSSSSSSSSSSSSSSSSSSS 33333333333333333333 D SSSSSSSSSS5888888888 E SSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS Overview Implement an algorithm for assigning seats within a movie theater to

image text in transcribed

[ SCREEN 11 A 88888888888888888888 B SSSSSSSSSSSSSSSSSSSS 33333333333333333333 D SSSSSSSSSS5888888888 E SSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS Overview 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. 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. Input Description 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. Output Description 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 F G SSSSSSSSSSSSSSSSSSSS H 88888888888888888888 I SSSSSSSSSSSSSSSSSSSS J SSSSSSSSSSSSSSSSSSSS 1 20 Example Input File Rows: R001 2 ROO24 R003 4 R004 3 Requirements 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. The solution and tests should build and execute entirely via the command line. 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. Create a README file that documents your assumptions and includes instructions for building the solution and executing the tests. Example Output File Rows: R001 11, 12 R002 F16,F17, F18,F19 R003 A1, A2, A3, A4 R004 J4, J5, J6 [ SCREEN 11 A 88888888888888888888 B SSSSSSSSSSSSSSSSSSSS 33333333333333333333 D SSSSSSSSSS5888888888 E SSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS Overview 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. 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. Input Description 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. Output Description 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 F G SSSSSSSSSSSSSSSSSSSS H 88888888888888888888 I SSSSSSSSSSSSSSSSSSSS J SSSSSSSSSSSSSSSSSSSS 1 20 Example Input File Rows: R001 2 ROO24 R003 4 R004 3 Requirements 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. The solution and tests should build and execute entirely via the command line. 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. Create a README file that documents your assumptions and includes instructions for building the solution and executing the tests. Example Output File Rows: R001 11, 12 R002 F16,F17, F18,F19 R003 A1, A2, A3, A4 R004 J4, J5, J6

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 Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions