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

  Early computer systems relied on command line interfaces

Early computer systems relied on command line interfaces to perform all actions. Today, the majority of systems use direct manipulation rather than a command line interface. The goal of designing a direct manipulation interface is to make use of the ..

  Design a system that outputs the average of the most recent

The data input is sampled when a single-bit input S changes from 0 to 1. Choose internal bit widths that prevent overflow.

  Value of th edifference between num

Write a return method named from Ten that returns an integer. fromTen takes in one parameter oftype integer named num. fromTen will return the absolute value of th edifference between num and 10. Do not write a Class, just a Method.

  Write a program that maintains a database containing data

For example, you could list people born in a given month. You should also be able to list everyone in the database.

  Develop data dictionary entries for a process

Use a CASE tool or a manual procedure to develop data dictionary entries for a process, data flow, data store, and data structure based on the data flow diagrams for any transport agency. As a group, agree on any assumptions necessary to make comp..

  Describes what icann does and why they are in the news

The ICANN is in the news. Write a short document (in your own words) that describes what ICANN does and why they are in the news.

  Determine the torque m that should be applied

Determine the torque M that should be applied to the screw to start lifting the 6000-lb load acting at the end of member ABC

  Engineering a balance between the resources of pc

How has this lesson affected the way you think about engineering a balance between the resources of the PC and the needs of users?

  Describe advantages and disadvantages of magnetic storage

In a 3 pages paper and double space describe the advantages and disadvantages of magnetic storage, optical storage, and solid state storage using criteria such as versatility, durability, capacity, access time, and transfer rate.

  Identify each of the risk tolerance categories

Identify each of the risk tolerance categories. Compare and contrast each and identify the category.

  Is this development good or bad for the software industry

What recent developments have challenged the reverse engineering of software in the United States? Is this development good or bad for the software industry? Why?

  Extend the editing of vehicles to allow editing of weight

Extend the editing of vehicles to allow editing of the weight

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