Question: THE EDITTING FILE IS /chapter 6_4.cpp *center of gravity and total weight*/ #include //Required for cin, cout using namespace std; const double PERSON_WT(160.0); //Average weight/person

THE EDITTING FILE IS
/chapter 6_4.cpp *center of gravity and total weight*/
#include //Required for cin, cout
using namespace std;
const double PERSON_WT(160.0);
//Average weight/person
const double FUEL_MOMENT(1169167.3); //Fuel tank moment const double EMPTY_WT(9021.0); //Standard empty weight const double EMPTY_MOMENT(2751405.0); //empty moment const double FUEL_WT(3618.0); //Full fuel weight const double CARGO_DIST(345.0);// weight const double CREW_DIST(120.0); //weight double CargoMoment(double); //function prototypes here double CrewMoment(int); void GetData(int&, double&); int main() { int crew; /umber of crew on board (1 or 2) double cargo; //weight of baggage, pounds double total_weight, center_of_gravity; cout.setf(ios::fixed); //Set format flags. cout.setf(ios::showpoint); cout.precision(1); GetData(crew, cargo); // call function total_weight = EMPTY_WT + crew*PERSON_WT + cargo+ FUEL_WT; center_of_gravity = (CargoMoment(cargo) + CrewMoment(crew)+ FUEL_MOMENT + EMPTY_MOMENT)/total_weight; cout > crew; while(crew 2) { cout > crew; }//end while cout > cargo; while(cargo 5000) {cout > cargo; }//end while cout HAND IN LABORATORY TASK: LAB #23 Run the calculating the center of gravity program: Study it carefully! 1.Check the text for their hand example. try it yourself and then run your rogram to be sure it reproduces the hand example. le. All outputs in the "TESTING" part of the problem. DO NOT HAND IN THE LATTER! 2. Modify the program by adding a second cargo bay that is 522 inches from the nose of the aircraft and has a maximum cargo weight of 1000 pounds. Run it and attach the output of the total weight and center of gravity once you do As well as copy the screen for input values similar to the "TESTING" section 3. Do the hand calculation for part 2 and hand that in with the Lab. Did you get about the same answer as the program gave you in 2? Yes! then no problem No! go back and redesign the code.. Run till you get a reasonable match HINT: YOU HAVE TO TAKE INTO ACCOUNT TWO CARGO BAYS NOT ONE AND ADD THE APPRORIATE CODE (IE FUNCTION OR FUNCTIONS)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
