Question: You are tasked to write a computer program for airline reservation. The airline operates to 3 cities (New York, Chicago, and Houston) from Denver. Direct

 You are tasked to write a computer program for airline reservation.
The airline operates to 3 cities (New York, Chicago, and Houston) from

You are tasked to write a computer program for airline reservation. The airline operates to 3 cities (New York, Chicago, and Houston) from Denver. Direct flights are available from Deaver to New York, and Houston However, to fly from Denver to Chicago, you will have to connect through Houston Write an airline reservation code in MATLAB to execute the following operations (use if-else constructs) Read inputs from the user for the following Destination city (Input 1 for NY, 2-Chicago, 3- Houston) Travel Class (input 1 for Economy, 2 for Business) .Number of Adults travelling .Do you want to fly only direct? (1 for yes, 2 for no) [if this option is yes and if the destination city does not have a direct flight, you should display an appropriate message indicating that there are no direct flights available- No further calculation should be done and the program should stopl Do you want extra leg space? (1 yes, 2 no) [This input should ONLY be asked if the passenger is traveling in econoemy class .Number of checked baggage Write a matlab code that calculates the total fare for the ticket based on the following For cities with direct flight Business class fare: $ 1100 per passenger for adults Economy fare: S 600 per passenger for adults Seats with extra leg space: Additional 550 For business class: First checked baggage: Free For business class: Additional checked baggage O1): S 50 per extra bag For economy class: Each checked baggage is $50 For cities with flights that have a connection Business class fare: $ 900 Economy fare: $ 500 Children fare (both economy & business): 509% of respective adult fare Seats with extra leg space: Additional S100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!