An airline vice president in charge of operations needs to determine whether the current estimates of flight times are accurate. because there is a larger possiblity of variations due to wether and air traffic in the longer flights, he allows a larger error in the time estimates for them. He compares an actual flight time with the estimated flight time and considers the estimate to be too large, acceptable, or too small, depending on the following table of acceptable error margins:
Estimated flight time in minutes Acceptable error margin in minutes
360 or more 17
For example, if an estimated flight time is 106 mins, the acceptable error margin is 4 mins. Thus, the estimated flight time is too large if the actual flight time is less than 102 mins, or the estimated flight time is too large if the actual flight time is greater than 110 mins; otherwise, the estimate is acceptable.
Write a function that uses a switch statement to determine the acceptable error for a given estimated flight time, according to this table. Use the function in a program that reads an estimated flight time and an actual flight time and then determines whether the estimated time is too large, acceptable, or too small. If the estimated flight time is too large or too small, the program should also print the amount of the overestimate or underestimate.
Recently Asked Questions
- (1) The frequency distribution shows the results of 200 test scores. Are the test scores normally distributed? Use (alpha) α = 0.10 Complete
- Which of the following is a solution? Steel Soil Sand in water Pure gold Oil in water
- 1. Q v [ S ⊃ ( P ⊃ R ) ] 2. ( T ⊃ R ) ⊃ S 3. ~ Q / ( T ⊃ R ) ⊃ ( P ⊃ R ) 4. S v ( P