Question
C++ Code: A cutting edge airplane company is testing many different kinds of aircraft. You are tasked to see which models are feasible. You are
C++ Code:
A cutting edge airplane company is testing many different kinds of aircraft. You are tasked to see which models are feasible. You are given data from wind-tunnel tests and must determine if each plane is able to fly.
Do this by:
(1) Getting inputs from file, assuming the following order:
FlightName b c weight V Thrust
AirplaneData1.dat
DL543 25 5 10000000 1 500 900000 5UA741 30 8 2200000 2 600 2000 10
AirplaneData2.dat
AA211 20 5 16000000 1 500 900000 6UA814 15 4 2200 2 600 1000000 8DL828 28 7 1900 1.5 400 900000 2DL634 40 10 9000000 1.5 300 700000 3
(2) Calculating the lift and drag:
- Lift equation:
where:
- Drag equation:
(3) If lift is greater than weight AND thrust is greater than drag, then the aircraft can fly. Otherwise it cannot fly, and the reasons it cannot fly must be listed. Put your answers in a file called flyHigher.txt.
If the file does not exist, your flyHigher.txt should simply say No data (see example 3).
Example 1:
Enter file name: AirplaneData1.dat
DL543 Can fly!!!
UA741 Cannot fly... Not enough thrust!
Example 2:
Enter file name: AirplaneData2.dat
AA211 Cannot fly... Not enough lift! Not enough thrust!
UA814 Cannot fly... Not enough thrust!
DL828 Can fly!!!
DL634 Cannot fly... Not enough lift!
Example 3:
Enter file name: notAValidFile.doh
No data
Step 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