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

  Java application to generate three-digit random number

Write a Java application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers.

  Create java applet to input miles driven and gallons used

Create the Java applet which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Create java servlets

Create a new JSON "view" (e.g., a JSP page that only displays the JSON representation of the data)

  Programming principles please help me doing my assignment i

please help me doing my assignment i have attached my assignment requirement document refer it and send me the solution

  Calculate the percent of kcal from each macronutrient

Calculate the percent of kcal from each macronutrient and the percent of kcal by fluids.

  Find the nth largest of 2 sorted arrays of length n

In java, use divide and conquer to find the nth largest of 2 sorted arrays of length n.

  Create a class safestack that implements a stack of strings

Create a class SafeStack that implements a stack of strings

  Design a program that asks the user to enter a series of 20

Number Analysis Program: Design a program that asks the user to enter a series of 20 numbers

  Error conditions as compared to using exception handling

What are the advantages and disadvantages of testing for error conditions as compared to using exception handling when performing input or output?

  Balancing binary search trees

Balancing Binary Search Trees,  Consider the file BST.java (a link to this file is provided below for downloading purposes) which defines a generic Binary Search Tree class.

  Class sorter which contains methods for selection sort

Write a class Sorter which contains methods for selection sort, insertion sort and bubble sort (start with the code below). Then create a client class which asks user to enter ten numbers using arrays. Then the program asks user which sorting algo..

  Ask user to enter a list of names

Write a program that ask a user to enter a list of names. When you finish, The program will show the total number of characters in all the names.

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