Write a program that can be used to assign seats

Assignment Help Basic Computer Science
Reference no: EM13306134

Write a program that can be used to assign seats for a commcommercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class, and rows 8 to 13 are economy class. Your program prompts the user to enter the following information:

a) Ticket type (first class, business class, or economy class)
b) Desired seat

Output the seating plan in the following format:

A B C D E F
Row 1 * * X * X X
Row 2 * X * X * X
Row 3 * * X X * X
Row 4 X * X * X X
Row 5 * X * X * *
Row 6 * X * * * X
Row 7 X * * * X X
Row 8 * X * X X *
Row 9 * * X * X X
Row 10 * X * X X X
Row 11 * * X * X *
Row 12 * * X X * X
Row 13 * * * * X *

Here, * indicates that the seat is available; x indicates that the seat has been assigned. Make this a menu driven program; show the user's choices and allow the user to make the appropriate choices.Beginning with this assignment and including all subsequent assignments ... do not assume that you will recieve "good data" (ie. your program must inspect all input data to ensure that it is valid, and take appropriate action if it is not).

Your program should begin by presenting a menu that has (at a minimum) the following items to choose from: "Assign a Seat"; "Cancel a Reservation"; "Print the Seating Chart"; and "Exit the Program". Once a selection is made, process that selection. You may break down the "Assign a Seat" menu item into three separate choices ... "Assign a First Class Seat"; "Assign a Business Class Seat"; and "Assign an Economy Seat" ... if you like.

Your should only print the seating chart when that selection is chosen from the menu.

note: plz do this by following my instructions everytime the solution u gave me was not following my instructions.

Reference no: EM13306134

Questions Cloud

Describe a societal issue related to cloning : Explain why the phenotype of the cloned mammoth would be similar to the woolly mammoth and not to the elephant egg donor or surrogate elephant mother
Write a screen saver program that generates random shapes : Write a Screen Saver program that generates random shapes of random colors and sizes at random positions within the display area. Add controls so typing different keys on the keyboard cause the window to change size and background color as describ..
Find the speed of the approaching police car : Two police cars have identical sirens that produce a frequency of 560 Hz. Find the speed of the approaching police car
How fast was it traveling when it reached the bottom : In the Blackhawk landslide in California, a mass of rock and mud fell 465 m down a mountain and then traveled 8.3 km across a level plain. How fast was it traveling when it reached the bottom
Write a program that can be used to assign seats : Write a program that can be used to assign seats for a commcommercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class, and rows 8 to 13 are economy class
What intensity of light emerges : The unpolarized light of intensity I(not) is passed through two polarizers with axes oriented at 30degrees from each other. What intensity of light emerges
Find the absolute pressure in the bulb : A meat baster consists of a squeeze bulb attached to a plastic tube. When the bulb is squeezed and released, find the absolute pressure PB in the bulb
Describe binary tree traversals : Describe binary tree traversals (inorder, postorder, preorder and level-order). Give examples of applications of these traversals.
Determine the total force the man must exert on bar ab : A man having a weight of 167lbattempts to hold himself using one of the two methods. Determine the total force he must exert on bar AB in each case and the normal reaction he exerts on the platform at C.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create application to declares array of ten houseplant

Design an application that declares an array of 10 HousePlants. Prompt the user for data for each of the HousePlants, then display all values.

  Calculate roots of function by newton-raphson approximation

Best known iterative method for calculating roots of a function f (that is, x-values for which f(x) is 0) is Newton-Raphson approximation.

  Examine and assess the main computing problems

Use at least three (3) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

  Staffing level requirements for project team

Describe in scholarly detail how you would use WBS as aid to finding staffing level requirements for project team?

  What is the relationship between transistor densities

In two paragraphs explain what is the relationship between transistor densities and the improvement in computer speed and miniaturization?

  What is break -even point for upgrades

You have also learned that you can upgrade your CPU to make it 1.4 times as fast for $5,000. Which would you choose to yield the best performance improvemen tfor the least amount of money?

  Write a program to determine the answers of the square root

How do you write a program to determine the answers of the square root of 30, the sine and cosine of 100, the value of the floor, ceiling, and round of 44.7, and the larger and the smaller of the character K and the integer 70? In Java code

  What rc key value leave state vector during initialization

What RC4 key value will leave state vector, S unchanged during initialization? That is after the initial permutation of S, the entries of S will be equal to the values.

  Similarity and differences between the code of c++ and java

The following is simple java program with a for loop and a simple function What is its equivalent in C++ code? Notice the similarity and differences between the code provided below to C++. Create a project and run the program and see how it runs.

  Find the point of intersection of the lines

find the point of intersection of the lines L1 : x(t) = 2-t y(t) = t ,z(t) = t-3 and L2 : x(u) = u + 1 , y(u) = 3u + 1 ,z(t) = u-2

  Design the static method below to count

Design the static method below to count and return the frequency of each digit in the array of strings.

  Organizing function of management

Discuss and explain the company function of management as it relates to at least two of the organizational resources:

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