Wap to assign seats on each flight of the airline only plane

Assignment Help C/C++ Programming
Reference no: EM131608563

Question: (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You'll 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"

Please type 2 for "economy"

If the person types 1, then your program should assign a seat in the first class section (seats 1- 5). If the person types 2, then your program should assign a seat in the economy section (seats 6- 10). Your program should then 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 single-subscripted array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding element of the array to 1 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: EM131608563

Questions Cloud

Challenges of public sector collective bargaining : Discuss right to strike and its impact on private and public employees. Identify and explain some of the challenges of public sector collective bargaining.
Challenges of public sector collective bargaining : Discuss right to strike and its impact on private and public employees. Identify and explain some of the challenges of public sector collective bargaining.
What are the chances of winning at craps : How many games are won on the first roll, second roll, ..., twentieth roll and after the twentieth roll?
Differences between data and information : What are the characteristics of and differences between data and information? Why is it important to distinguish between the two
Wap to assign seats on each flight of the airline only plane : (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program.
Standardization or an international strategy : A structure is more appropriate for firms pursuing global standardization or an international strategy.
Preserves all original formatting : When creating a web query, which option preserves all original formatting?
Experience with creating a presentation recording : Discuss your experience with creating a presentation recording? How is the process going and what obstacles you faced?
Problem related to-the sieve of eratosthenes : Create an array with all elements initialized to 1 (true). Array elements with prime subscripts will remain 1. All other array elements will eventually.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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