Represent the seating chart of the plane

Assignment Help Basic Computer Science
Reference no: EM131255745

(Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. You've been asked to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats). Your program should display the following menu of alternatives-Please type 1 for "First Class" and Please type 2 for "Economy". If the person types 1, your program should assign a seat in the first class section (seats 1-5). If the person types 2, your program should assign a seat in the economy section (seats 6-10). Your program should print a boarding pass indicating the person's seat number and whether it's in the first class or economy section of the plane.

Use a one-dimensional array to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of the array to true to indicate that the seat is no longer available.

Your program should, of course, never assign a seat that has already been assigned. When the first class section is full, your program should ask the person if it's acceptable to be placed in the economy section (and vice versa). If yes, then make the appropriate seat assignment. If no, then print the message "Next flight leaves in 3 hours."

Reference no: EM131255745

Questions Cloud

How much current is required for the process : Assume the volume of the nuggets will be twice the volume of the projections because metal from both plates is melted. How much current is required for the process?
Represents the name ofthe course instructor : Modify class GradeBook. Include a second String instance variable that represents the name ofthe course's instructor. Provide a set method to change the instructor's name and a get methodto retrieve it.
Describe the scope and analyze how to control the scope : Describe the project including the following: Describe the scope and analyze how to control the scope. Identify possible risks, constraints, and assumptions. Describe the integration with other systems and infrastructure
Discuss impact of standard movement on classroom instruction : Explain how state standards came into existence. Discuss the impact of the standards movement on classroom instruction. How do the Common Core Standards intend to affect instruction in schools to meet both learner and societal goals?
Represent the seating chart of the plane : Use a one-dimensional array to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of the array to true to indic..
What is the crosssectional area of the weld bead : A flux-cored arc-welding process is used to join two low alloy steel plates at a 90° angle using an outside fillet weld. The steel plates are 1/2 in thick.
What is a trap instruction : What is a trap instruction? Explain its use in operating systems. What are the differences between a program, an executable, and a process? Define the following in the context of operating systems:
Find the likely value for travel speed v in the operati : The cross-sectional area of the weld seam = 75 mm2 and the melting factor of the stainless steel is assumed to be 0.60. Using tabular data and equations given in this and the preceding chapter, determine the likely value for travel speed v in the ..
What are the two joint types most commonly used in brazing : Certain changes in joint configuration are usually made to improve the strength of brazed joints. What are some of these changes?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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