Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed V Thrust image text in transcribed

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: image text in transcribed

image text in transcribed

where:

- Drag equation: image text in transcribed

(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

apVzC L

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions