Create a java program using programming fundamentals

Assignment Help Computer Engineering
Reference no: EM132212337

Write pseudocode for the following problem.

Objectives: Create a Java program using programming fundamentals (file I/O, loops, conditional statements, arrays, functions)

Problem: In preparation for the release of Guardians of the Galaxy 2, you have been hired by the owner of a small movie theater to develop the backend for an online ticket reservation system.

Patrons will be able to reserve seats in one of three auditoriums.

Once the patron has selected an auditorium, the program should display the current seating arrangement and allow the patron to select seats.

A report should be generated at the end of the program to specify for each individual auditorium and overall for all auditoriums how many seats were sold/unsold and how much money was earned.

Details

The seating arrangement for each auditorium will be stored in separate files. These files will be named A1.txt, A2.txt and A3.txt for auditorium 1, 2 and 3 respectively. ? Each line in the file will represent a row in the auditorium. The number of rows in each auditorium is unknown to you.

The number of seats in each row of a single auditorium will be the same. For example, if the first line of the file has 15 seats, then every subsequent row in the theater will also have 15 seats. This does not mean that each auditorium has the same number of seats in each row. One auditorium may have 15 seats per row and another may have 20 seats.

Each auditorium will be held in a two-dimensional array.

Empty seats are represented by a pound sign (#).

Reserved seats are represented by a period (.).

Tickets can only be reserved the day of the screening and all screenings are at 7 PM that night. There is no need to worry about multiple screenings or reserving seats on a specific day.

All tickets are $7 regardless of patron age or auditorium. User Interface and Input: Present a user-friendly menu system for the user to select the auditorium.

First ask for the auditorium: 1. Auditorium 1 2. Auditorium 2 3. Auditorium 3 4. Exit Although in reality the user would likely only make one purchase, for testing purposes, assume the user will repeat the ticket buying process until they decide to quit. Once the auditorium has been selected, display the current seating availability for that auditorium. An example seating chart is provided below for an auditorium with 5 rows and 20 seats per row.

12345678901234567890

1 ...##..#####........

2 ########....####..##

3 .........##.........

4 #.#.#.#.#.#.#.#.#.#.

5 ########.#####.#####

The seats are numbered sequentially from left to right and only the ones digit is displayed above each column to make it easier to display the chart.

It is understood that the second set of digits from 1-0 are for the numbers 11- 20 in the above example. After the user has selected the auditorium and the seating chart has been displayed, prompt the user for the following information in the order below:

Row number

Starting seat number

Number of tickets Assume that the user wants to reserve sequential seats to the right of the first seat entered. If the desired seats are not available, offer the user the best available seats that meet their criteria on that row only. The best available seats are the seats closest to the middle of the row.

Prompt the user to enter a Y to reserve the best available or N to refuse the best available. Once the selection has been processed, return to the main menu. All input will be of the valid data type. You do not have to worry about the user entering a letter when a number is expected or a floating point number when an integer is expected. You are responsible for validating that the data falls within the proper range and that a user does not try to reserve a seat that is already reserved.

Output: At the end of the program, write the current status of each auditorium to the respective file. Also, display a formatted report to the console. The report should consist of 4 columns:

Column 1 - labels

o Auditorium 1

o Auditorium 2

o Auditorium 3

o Total

Column 2 - number of seats reserved for each label

Column 3 - the number of open seats for each label

Column 4 - the total of the ticket sales for each label

Reference no: EM132212337

Questions Cloud

Write pseudocode for dictionary operations insert : Write pseudocode for dictionary operations insert, lookup, and delete using doubly-linked lists with duplicates. State the complexity of your algorithm.
Write a python code that the time it takes for the object : Write a python code that The time it takes for the object to reach the target.
Explain the managerial accounting concepts : Many of the concepts in managerial accounting were first developed for the manufacturing environment. Do you think the same concepts, such as variable costs.
Write a python procedure to implement basic newtons method : Implement the stopping condition where the difference of the iterates is less than the tolerance. Test your program on the function.
Create a java program using programming fundamentals : Create a Java program using programming fundamentals (file I/O, loops, conditional statements, arrays, functions).
How would action affect the year-end income statement : Exeter is a building contractor on the Gulf Coast. After losing a number of big lawsuits, it was facing its first annual net loss as the end of the year.
What did you learn about estimated liabilities : Liabilities and Contingencies: Can they be estimated? Are they probable to occur? What did you learn about estimated liabilities and contingencies.
Are there times a predetermined overhead rate : There are actual overhead rates and predetermined overhead rates. Are their instances when using an actual overhead rate is better than a predetermined overhead
Prepare the entry to record the cost of the ore mine : Diamond Company acquires an ore mine at a cost of $1,300,000. It incurs additional costs of $200,000 to access the mine, which is estimated to hold 500,000 tons

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd