Final Project -- Final Hand-In Edition -- Due 4/22 General Rubric: 1 Point Each -A loop that correctly allows everything to be repeated -A loop for all stages around portion I - computing dvs -A loop for all stages around portion II - computing total mass, fuel mass and deltaV -User input is handled via functions -User input is error checked for min/max and standard input failure (cin.fail) using while -correct dV computation and in a function -The user may enter a number of stages (can be different for I and II) -dynamic arrays are used to store all user input values (except # of stages) -correct control around error states -overall good programming practice, structure and compilation. ----- Instructions: *** Place a comment at the top of your file that describes all the help you've received and its source. Also describe who you worked with, or who you have helped. Code should be your own, although you should work in groups and it is okay to get help on a sticky point from another student, but it must be documented. Plagiarism will be reported. *** Name your cpp lastname_firstname_finalproject.cpp *** For example, ramsey_doc_finalproject.cpp ----- Our final project involves two groups of computations. One will compute the total deltaV of an existing rocket and its stages (portion I). The other involves computing the fuel mass and total mass required to achieve a certain deltaV of a payload (portion II). The data read in by the user should be stored in dynamic arrays. Refer to other worksheets for specifics. Portion I: Ask the user for a number of stages. For each stage, ask the user for: ISP, total_mass and fuel_mass. Compute the dV for each stage using the formula: dV = gravity * ISP * ln ( total_mass / ( total_mass - fuel_mass ) ) Compute teh total dV of all stages combined. Ouput the average fuel mass and total_mass over all stages. Portion II: Ask the user for a number of stages. For each stage, ask the user for: ISP, payload_mass, and target_dV The total mass will be the payload mass plus fuel mass plus inert mass to hold the fuel mass (a fuel container.) In each stage, you will compute the total mass and fuel mass of the stage required to achieve the target_dV. The steps follow. **NEW** Compute eV = e ^ ( target_dV / ( gravity * ISP ) ) If eV is less than 0, do not perform the following loop. Also, if eV is greater than or equal to 9, do not perform the following loop and output an error to the console. **End NEW** Compute the fuel mass, total mass, and actual dV by using a loop. This loop should continue until the computed dV is larger than the target dV. In each iteration of the loop, increase the fuel mass by 1 unit. In each iteration, there is an inert mass increase by 0.125 units. The total mass is then the payload + fuel_mass + inert_mass. Compute the dV (same equation as before) of this stage using the given ISP. When this loop completes, the fuel mass, inert mass and total mass of the stage is known. In addition, the actual dV of that stage is also known. Report the total mass, fuel mass and computed dV to the user. Sample Execution of My Code: Welcome to Ramsey's dV and mass Calculator How many stages will your craft have?2 **** Input Stage Information **** ********* Stage #1 ********* Stage name: First Total weight: 30 Fuel weight: 10 ISP: 200 Computed dV of this stage is: 795.251 ********* Stage #2 ********* Stage name: Second Total weight: 19 Fuel weight: 9 ISP: 300 Computed dV of this stage is: 1888.33 ** Computed ** The total dV of this craft is: 2683.58 Averages masses were: 24.5, 9.5 --Computation #2 - given a payload, reach a target dV-- How many stages:2 ********* Stage #1 ********* Stage name: Happy Payload wt: 10 Target dV: 5000 ISP: 300 ** Computed ** Fuel: 102 Total: 124.75 Actual dV: 5006.53 ********* Stage #2 ********* Stage name: Lucky Payload wt: 134.75 Target dV: 1000 ISP: 400 ** Computed ** Fuel: 41 Total: 180.875 Actual dV: 1008.35 Want to do this again? (y/n) n