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

  How do the statistics compare

• Rules for breaking ties in the event list Run both this simulation and the original simulation on several sets of input data. How do the statistics compare?

  Design and build a zoo organizer

You are to design and build a zoo organizer. The zoo organizer should keep track of a set of animals. The zoo organizer should be able to keep track of different sets of animals. The organizer only needs one set of animals open at a time. It should h..

  Transformational theory leader-member theory

How would you apply the transformational theory leader-member theory (LMX) to improve an organization's performance? Discuss in the context of your own organization, an organization you have belonged to in the past, or another existing organizatio..

  What role do users have in the development phase

At least 200 words for each question 1.  What role do users have in the development phase and integration phase for information systems? 2.  What advantages does commercial off-the-shelf software provide over custom software?

  Australian infrastructure fund

1. Determine the type of investments that an Australian infrastructure fund would invest into. 2. Would it be worth Jarryd holding his investments within a master fund or wrap account structure? What are the advantages and disadvantages of this app..

  Decision-making or performance-monitoring

Describe at least 2 processes using IPO Indicate the steps in which decision-making or performance-monitoring are taking place Describe an expanded use case for one of the actors Draw a use case diagram for that actor All based on the case study B..

  What is the radix x

Two numbers given in certain radix X are (55)X and (64)X. If we add this two numbers, the result is (130)X. What is the radix X?

  Bob is stationed as a spy in cyberia for a week

Bob is stationed as a spy in Cyberia for a week and wants to prove everyday of this week that he is alive and has not been captured. He has chosen a secret random

  initialize the temperature to 100 degrees celsius

Initialize the temperature to 100 degrees Celsius. In a loop, decrement the Celsius value and compute the corresponding temperature in Fahrenheit until the two values are the same.

  Establishing a network connection between two points

In your option what are the challenges in establishing a network connection between two points over a large distance, describe your own knowledge of this network configuration.

  Declared and assigned some integer values

Assume that a boolean variable named a has been declared and assigned the value true or false. You should also assume that two hint variables named b and c have been declared and assigned some integer values.

  What is the order of the bucket sort

What is the order of the bucket sort? Why is the bucket sort not useful as a general sorting algorithm?

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