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

  Manual park button and the application accurately

As an application tester, I want to press the manual park button and the application accurately records the location of the intended vehicle. The ratio of successes to failures will be recorded to report to the development team.

  Conduct observation used in business or organization

Conduct the observation to someone involved in procedure which is used in a business or organization. This person could be someone at university, in small business in your neighborhood.

  Synthesizing a picture of an area

Synthesizing a picture of an area, its relevance, structure and core ideas; and identifying what problems they are trying to solve and issues that need further exploration.

  Write a program keeps an appointment calendar in database

Write a program that keeps an appointment calendar in a database.

  Define a class named circle

Define a pure abstract base class called BasicShape. The BasicShape class should have the following members.

  Identify five different it systems

Identify five different IT systems that have affected business in the past few years. For each system, briefly note the following: · A name for the system

  Show her to install and used it in my network administration

and show her to install and used it in my network admistaion class

  Program that reads a file of computer data names computers

write a program that reads a file of computer data names computers.txt. creates an array of Computer objects.

  What do the terms liquidity and solvency mean

we saw how cells of similar size, shape, and function form tissues. As a tissue, muscle is very diverse! Let's kick off our study of muscles by discussing the subtypes of muscle tissue, beginning with smooth muscle. Where do we find this muscle tissu..

  Explain what can-t be measured can-t be effectively managed

According to the following quote "what can't be measured can't be effectively managed." The question is can everything that is important in network security be measured using metrics or any other process? Why or Why not?

  Creating an object-oriented, multiple-file project and class

Overview creating an object-oriented, multiple-file project and class definition involving the use of static data members,

  Key principles on smart phone devices gps tracking system

How to apply these key principles on smart phone devices GPS tracking system/software to mitigate user personal information be exposed undesirably.

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