Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The lab exercise this week (Week 03) was to write a program to compute the wing loading value (WLV), defined as the weight of an

The lab exercise this week (Week 03) was to write a program to compute the wing loading value (WLV), defined as the weight of an airplane (in kg) divided by its wing area (in m^2). Airplanes with low wing loading values are easy to maneuver but uncomfortable. Airplanes with high wing loading values are more comfortable, but less maneuverable. In this exercise, an engineer is trying to design an aircraft with a WLV in the range 290.0 - 310.0, inclusive.

You're going to write a C++ program to help the engineer in their design work. The program will input two real numbers, the weight (in kg) followed by the wing area (in m^2), and then compute the WLV. If the WLV falls within the design range of 290.0 - 310.0, inclusive, the program outputs "design: good". However, if the WLV falls outside this range, the program outputs how the wing area should change to achieve a WLV of 300.0. Example: suppose the inputs are (denoting weight and wing area, respectively):

38000.0 124.5

In this case the WLV is 305.221, so the program outputs

WLV: 305.221 design: good 

because the WLV falls with the design goal of 290.0 - 310.0, inclusive. Note there is one space following each ":", and each line should be followed by C++ endl. However, suppose the inputs are

32000.0 99.2 

The WLV 322.581, which is too high --- and implies the wing is too small. So the program outputs

WLV: 322.581 design: increase wing area by 7.46667m^2 

because the target wing area (TWA) for the given weight is 106.66667 (i.e. 32000.0/TWA = 300.0), and 106.66667 - 99.2 = 7.46667. Likewise, suppose the inputs are

28500.0 102.25 

The WLV is 278.729, which is too low --- and implies the wing is too big. So the program outputs

WLV: 278.729 design: reduce wing area by -7.25m^2 

because the target wing area (TWA) for the given weight is 95.0, and 95.0 - 102.25 = -7.25. Finally, if either of the inputs is negative, do not perform the computation and instead output 'invalid data!". This implies the program has exactly one output: either "invalid data!", or the wing loading value followed by design guidelines.

[ HINT: you have the equation for WLV. Compute the engineers target wing area based on the weight and desired WLV of 300.0. Then youll have what you need to compute the change in wing area. It's just one or two lines of C++ code to compute what you need. ]

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

sharing of non-material benefits such as time and affection;

Answered: 1 week ago