Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

The program you will create is to allow a user to enter the type of seats on an airplane they would like (first class, business class, coach, economy) and you will write the code that will prompt them for the category they want to purchase and you will print out the number of seats available for that type of seat category.

You will use the 2 parallel arrays, seats[] ={5, 3,1,2} and price[] ={1200, 850, 600, 450} ; seats[] represents the number of seats available for each category - seats[0] = 5, which means there are 5 seats available in first class. seats[1] = 3 which means there are 3 seats available in business class, etc. price[] represents the price for each of these categories of seats: price[0] = 1200 which means a first class seat costs 1200 dollars

The output should look like

Welcome to Delta Airlines!

Please enter the amount of money you have to spend on a seat:

550

You can buy a seat in category 3.

Which category would you like to inquire about?

0

Category 0 has 5 seats available

Would you like a seat in category 0?

No

Which category would you like to inquire about?

1

Category 1 has 3 seats available

Would you like a seat in category 1?

Yes

Thank you for flying with us! You have a seat in category 1 for 850 dollars

New values for arrays:

seats[] = 5 2 1 2

prices[] = 1200 850 600 450

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93094718

Have any Question?


Related Questions in Computer Engineering

Question you recently joined a local cyber security hackers

Question: You recently joined a local cyber security "hackers" group that meets once a month to discuss recent cyber security related events, as well as tools and techniques. You have offered to present at the next meeti ...

Question suppose that someone tells you that an attribute

Question : Suppose that someone tells you that an attribute that is part of a composite primary key is also a candidate key. How would you respond to that statement? Explain.

Your solution will entail writing a function called

Your solution will entail writing a function called TimeDifference and a test main that demonstrates that you can compute the time difference in minutes between the two times. TimeDifference is a function that receives a ...

Determine the critical values for a left-tailed test of a

Determine the critical? value(s) for a? left-tailed test of a population mean at the alpha α=0.01 level of significance based on a sample size of n=15.

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

You have been offered a contract worth 1 million per year

You have been offered a contract worth 1 million per year for five years. However, to take the contract, you will need to purchase some new equipment. Your discount rate for this project is 12%. You are still negotiating ...

Write a c program please follow instructions exactly this

Write a C++ program. PLEASE FOLLOW INSTRUCTIONS EXACTLY. This program takes its inputs from a file that contains numbers. The program reads them in as type double. The program outputs to the screen the  standard deviatio ...

Question suppose users share a 2 mbps link also suppose

Question : Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. When a circuit switching is used, how many use ...

Do you need computers or information and communication

Do you need computers or information and communication technologies to store, organize, and manage data in organizations? Explain how the present day organizations in a developed country like the USA store and manage the ...

Question summary on hypertext transfer protocol http

Question : Summary on Hypertext Transfer Protocol (HTTP) describing its major features, principles of operation and application in transferring traffic over the World Wide Web. The response must be typed, single spaced, ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As