Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using C++ the last picture is the beginning of the code so don't use advanced code commands Because my class is CS1 and we just
using C++ the last picture is the beginning of the code so don't use advanced code commands Because my class is CS1 and we just start learning. thanks
Jumm M Inbox Google G what Master Glaunch 117MT Gaining cswebdav/pid-334817-dt-announcement-rid-23347778_1/courses/29318.CISC1600R03.202020/CISC -Calibri . 2. BIUA. A. ESTE We will write a small program for Fordham Airlines to allow the customer to purchase flights. calculating how much the customer owes, taking payment, and calculating change. The airline sells tickets for travel during two time periods: daytime (departing 5am-7pm) and nighttime (departing 7pm-5am). The airline sells tickets for three destinations: Chicago, Miami, and Portland. The airline sells tickets for two types of days: weekday and weekend (you could use 'D' for weekday and 'E' for weekend). Pricing information: For Miami travel, flight prices are as follows: For weekday travel: $150 during the daytime, $100 during the nighttime For weekend travel: $180 during the daytime, $120 during the nighttime Chicago flights cost half the price of Miami flights, and Portland flights cost twice as much as Miami flights. For example, a Portland weekday flight during the nighttime is $200. A Chicago weekend flight during the daytime is $90. Your program is to work as follows: 1. Display a welcome message (e.g., "Welcome to Fordham Airlines!") 2. Prompt the user to input his/her destination: Chicago, Miami, or Portland (I recommend you use letters to represent each input) 3. Prompt the user to input what time s/he wishes to travel (in army time, e.g., 800 for Bam or 1530 for 3:30pm) 4. Prompt the user to input what type of day (s) s/he is traveling. Weekday or Weekend (l recommend you use letters to represent each input) Report the price per ticket of the specified type 6. Prompt the user for the number of tickets to be purchased If the number of tickets is fewer than 0 report that the number of tickets ordered is invalid and the order has been cancelled, then exit; otherwise: 7. Compute and display the total amount due (no sales tax this time! Macm M Jumm M Inbox Google G what Master Glaunch 117 M. Gaine com/bbcswebdav/pid-334817-dt-announcement-rid-23347778.1/courses/29318.CISC1600R03.202020/CISO tParagra... - Calibri . 12. BIUAA. ZEE HUILU ve vuun. Ru, RCA, 7. Compute and display the total amount due (no sales tax this time!) 8. Prompt the user to enter the amount s/he is paying If the amount paid is less than the amount due, report that the amount paid is too little and the order has been cancelled, then exit; otherwise: 9. Display change and confirm the order has been placed Two example executions of the ticket program are given at the end of this document. For this lab you must use: At least one if-else statement At least one constant variable (for example: const int a-42;) Good coding style (comments, spacing, good variable names) --- it counts for 30% of your grade! I recommend you look over the programming advice I have placed on our lab website as well, to help as you write and debug. As you write your program, it is wise to make sure you can make a program that performs the first 4 steps before you work on step 5, that you can make a program Maste G Jound 117 M. Gatine che a/bbcswebdav/pid-334817-dt-announcement-rid 23347778_1/courses/29318 CISC1600R03.202020/CISC-1600 Calibri your grade! 12. BIUAAE EEE I recommend you look over the programming advice I have placed on our lab website as well, to help as you write and debug. As you write your program, it is wise to make sure you can make a program that performs the first 4 steps before you work on step 5, that you can make a program that performs the first 5 steps before you work on step 6 and so on. Example execution: $ ./fordhamAir.out Welcome to Fordham Airlines What is your destination? ([C]hicago, [M]iami, or [Portland) What time will travel? (Enter time between 6-2359) 450 what type of day are you traveling? (Week[E]nd or week [D]ay) E Each ticket will cost: $240.00 How many tickets do you want? 2 You owe $480.00 How much will you pay? 100.00 That is too little! No tickets ordered. Another example execution $ ./fordhamAir .out Welcome to Fordham Airlines What is your destination? ([C]hicago. [M]iami. or [Portland) What time will travel? (Enter time between 0-2359) 1345 What type of day are you traveling? (week[E]nd or week [D]ay) D Each ticket will cost: $150.00 How many tickets do you want? 3 g MaomM Jumma M Inbox Google G what Maste launch 117 TG are a rd.com/bbcswebdav/pid 334817-dt announcement-rid-23347778_1/courses/29318 CISC1600R03 202020/CISC-160 ListParagra... - Calibri - 12- B IV A A - S E That is too little! No tickets ordered. Another example execution $ ./fordhamAir.out Welcome to Fordham Airlines What is your destination? ([C]hicago, [M]iami, or [Portland) What time will travel? (Enter time between 0-2359) 1345 What type of day are you traveling? (week[E]nd or week [D]ay) D Each ticket will cost : $150.00 How many tickets do you want? 3 You owe $450.00 How much will you pay? 500.00 You will get $50.00 in change. Your tickets have been ordered ! Este ed ut t ia tiketi har holdt cat det tycka a Portland com a wish to trail ca . 23 Franting way are to thrice 130 ter 10 e a 1900 autre 120 cout "Each chat will it you o r ice dellare endlStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started