Determining the menu of alternatives

Assignment Help Basic Computer Science
Reference no: EM131255069

(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: EM131255069

Questions Cloud

What is the gulf of execution : 1. How does Norman define "execution" and "evaluation"? 2. What is the Gulf of Execution? Give an example. 3. What is the Gulf of Evaluation? Give an example?
Evaluate the reasons cited by obrian for relocation : Evaluate the inducements offered Southern Recreational Vehicle Company by community leaders in Ridgecrest, Mississippi.
Rationalize the denominator and simplify if possible : Rationalize the denominator and simplify if possible. Perform the indicated operations and simplify the result. Use radical notation to rewrite the expression. Simplify if possible:
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. Modify the constructor to specify two parame..
Determining the menu of alternatives : (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 pla..
Characteristic to be successful in information system career : Identify several personal characteristics needed to be successful in an information system career. Do you feel that you possess any of these characteristics?
What is the error polynomial : 1. What is the error polynomial? 2. What is the generator polynomial? 3. Is the receiver guaranteed to detect this error? Show your work in polynomials.
Essay - visual rhetorical analysis : Essay: Visual Rhetorical Analysis. For this essay you will doing a visual rhetorical analysis. I want you to look for a cartoon, comic strip, advertisement, or a meme to analyze for this paper. The complexity of this image is up to you, but it sho..
Execute the indicated operations and simplify the problem : Perform the indicated operations and simplify: (2x+1)/(x^2+x-6)+(2-x)/(x^2+x-6). Solve for x: (x-2)/(x+4)=1/x.  Solve for x: (x^2-2)/x-5= (2x-2)/x

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Give constructional details of ceramic

Give constructional details of ceramic, mica, film and electrolytic capacitors. Give their typical applications.

  Parallel processing effectiveness

Parallel processing effectiveness Consider two versions of the task graph in Fig. Version U corresponds to each node requiring unit computation time. Version E/O corresponds to each odd-numbered node being unit-time and each even-numbered node tak..

  How the model improves buy-in from stakeholders

Support your answers with at least one peer-reviewed source, using scholarly literature. Include APA-formatted in-text citations and accompanying, congruent APA-formatted references.

  Apply the requirements and architecture models

Apply the Requirements and Architecture Models to perform the analysis and design of the alarm control software described above (you can make - and should document - necessary assumptions), and document all results obtained from each of the follow..

  Create a name class composed of three string objects

Create a Name class composed of three String objects (for First, Middle, and Last). Provide methods and operators for comparing Names, reading and writing Names, and for allowing the retrieval and changing of the components of a Name.

  Corporate budgeting in terms of paying for it

1. Define the terms allocation, chargeback and corporate budgeting in terms of paying for IT. Give a business advantage and a disadvantage of each. 2.. Briefly define TCO as a way to cost an IT purchase. What are TCO's benefits?

  Create the digital building block adder in verilog

Create the digital building block adder in Verilog. Give baseline design (of minimum cost) and improved design (of higher performance). Compile, simulate, and synthesis your Verilog codes.

  Discuss the criteria to consider in specifying the structure

Identify the data that should be incorporated into CGC's new system to provide adequate planning capability. Explain why each data item it is important and the level of detail needed for the data to be useful.

  Develop a boolean expression for the truth table

Develop a Boolean expression for the truth table shown below. Express the answer in both the complete and simplified SOP formats. Use an apostrophe to indicate the use A' for A

  Program that calculates total amount of meal

Tip, Tax, and Total Design a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and 7 percent sales tax...

  Design the server to handle clients concurrently

Note that all of the work of authenticating the user and starting a login shell can be dealt with in each server child by having the (grand)child created by ptyFork() go on to exec login(1).

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