SCREEN 11 --- 3858888 888sasassssss 8888888 888ss8888s888 8888888 888S888888s8s 20 Example Input File Rows: RO01 2 RO02 4 RO03 4 RO04 3 Example Output File Rows: RO01 I1, 12 RO02 F16, F17, F18, F19 4א ,3 ,2 R003 ,A1 RO04 J4, J5,J6
c++ or java or in pseudo code with explaining
note: if anything is unclear or seems left out make an assumption and document your assumption
Implement an
fulfill reservation requests. Assume the movie theater has the seating
arrangement of 10 rows x 20 seats, as illustrated to the below.
The purpose 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 inbetween
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.
Requirements
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.
seats and/or one row is required.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps