Write a java program to assign passengers seats in airplane

Assignment Help JAVA Programming
Reference no: EM13950537

Write a Java program to assign passengers seats in an airplane. Assume a small airplane with seats numbered as follows:

1 A B C D
2 A B C D
3 A B C D
4 A B C D
5 A B C D
6 A B C D
7 A B C D

The program should display the seat pattern, with an 'X' marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like:

1 X B C D
2 A X C D
3 A B C D
4 A B X D
5 A B C D
6 A B C D
7 A B C D

After displaying the seats available, the program prompts for the seat desired, the user types in a seat, and then the display of available seats is updated. This continues until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should ask for another choice.

Reference no: EM13950537

Questions Cloud

Function of temperature in the range : 1. Air enters a  horizontal,  well-insulated  nozzle operating at steady state at 12 bar, 500K, with a velocity of 50 m/s and exits at 7 bar, 440 K. The mass flow rate is 1 kg/s. Determine the net force, in N, exerted by the air on the duct in the..
How much do you need to invest today to reach that desired : How much do you need to invest today to reach that desired amount 12 years from now?
Depreciation is a process of valuation : Depreciation is a process of valuation. Depreciation is a process by which a business sets aside cash to replace assets as needed.
Create a similar analogy for a high school reunion committee : Create a similar analogy for a high school reunion committee, a professional event planner, and a hotel event vendor that would manage the actual event.
Write a java program to assign passengers seats in airplane : After displaying the seats available, the program prompts for the seat desired, the user types in a seat, and then the display of available seats is updated.
Changes in kinetic and potential energy occur : Four kilograms of carbon monoxide (CO) is contained in a rigid tank with a volume of 1 m3. The tank is fitted with a paddle wheel that transfers energy to the CO at a constant rate of 14 W for 1 h. During the process, the specific internal energy ..
Which of the following is one of the purposes of law today : Which of the following is one of the purposes of law today? Identify the true statement about the role of law in the United States
Determine the cost of assigned : Determine the cost of assigned to ending inventory and to cost of goods sold
Create a project displays aisle number of movie category : A Search Button should located the correct location. from the array and display it in a lable. Make sure that the user has selected a category from the list and use the list box SelectedIndex property to find the appropriate aisle number.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Draw a picture with an appearance

You must use the given Rectangle and Oval classes to draw a picture with an appearance as close as possible.

  Write a program that will process the data file

Write a program that will process the data file to read the file and calculate the number of assistants and the average salary and the number of associates and the average salary

  Develop a graphical user interface

For this assignment, you are required to develop a Graphical User Interface (GUI) Java Program to demonstrate you can use Java constructs including input/output via a GUI.

  Elliptic curve encryption

write a program to implement Elliptic Curve encryption/decryption and program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).

  Delete a random element from an arraylist

Elements in an ArrayList and picking one at random to remove. Unfortunately, this slow, since deleting a random element from an ArrayList is slow because of all the shifting. For this question, you should modify the poll()method so that it runs in..

  Develop a queue class

Print-out of the text file that contains your restaurant information and develop a Queue class. Hint: Check out the sample Queue java source files included with this assignment. Declare a class Party to hold one party.

  Write a program that prompts the user for a start date

You need to write a program that prompts the user for a start date and an end date and then prints all of the dates between them (inclusive), with seven tab-separated dates on each line.

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Eliminate the last comma in the string output

Eliminate the last comma in the String Output which includes array output values from "hourlyTemp[i]" (entire list). My guess is that this needs to incorporate "%d" somehow but my online book won't accept the use of "%d" for some reason. From the boo..

  Design and implement a rmi-based client

In this assignment, you are requested to build a system which allows a school pupil to practise multiple choice tests in math. Design and implement a RMI-based Client / Server communication system in Java, which will do the following:

  Write a program that takes input of names from user

Write a program that takes input of names from user. Print total names number and all names. NOTE: Solve this problem using ArrayList and Enhanced For Loop. Typical run of the program:Enter a name: (Q to exit)

  Modify the inventory program by preparing a subclass of the

modify the inventory program by creating a subclass of the product class that uses one additional unique feature of the

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