Question: Can someone solve this using C++. REMINDER: comments to the user and the programmer are expected here USE MANIPULATORS SETW), SETPRECISION(3 or 4), SCIENTIFIC BE

Can someone solve this using C++.
REMINDER: comments to the user and the programmer are expected here USE MANIPULATORS SETW), SETPRECISION(3 or 4), SCIENTIFIC BE SURE/ ABTRACT IS IN THE SOURCE CODE */ (IE what it is all about!) . We are launching a projectile as part of Napoleon's army from one of our giant cannons. We need to study the canons ability to be sure we can hit the target. We have a castle at 1200 meters with a 30 meter wall, from where we are setting up our cannon, we know if we aim the cannon at some angle theta, , in degrees, at a initial muzzle velocity vo (u in image below) known to be 128 m/s for our canon, then the Range (how far it will go) in meters is given by a horizontal range v2 sin (20)/g (r in image below) with g as a constant 9.8 m/s2 BE SURE YOU ANSWER EACH PART! LABEL THEM! . The maximum height( h in image below) is given byV n2 ()/(2g) And the time for the complete motion 2Vo sin(0)/g (you have to convert to radians to use the sin)) be sure output section shows the original angle in degrees LABEL EACH OF THE FOLLOWING PARTS IN YOUR OUTPUT SECTION height, h Horizontal range PART 1. Write the program that inputs the Angle in degrees. THIS ANGLE SHOULD BE IN OUTPUT! . Be sure to request input and let the user know why You are asking for the data with "cout statements Then Output: Range, Max height and time of journey for all cases: make it clear in output as to what the values mean! First run a hand calculation for some angle and then test it as part of the Run For two more arbitrary angle input cases. Be sure your test angle from the hand calculation gives good answers before proceeding. SHOW HAND CALC!! Copy output screen as usual OUTPUT EXPECTED PART 1: FIRST TEST RUN AND TWO MORE SENSIBLE RUNS 90 AND 180 DEGREES DO NOT MAKE SENSE UNLESS YOU WANT TO KILL YOUR OWN TROOPS AND YOUR HAND CALCULATION FOR TH FIRST angle. See NEXT PAGE FOR FURTHER INTSRUCTIONS ON LAB#6 PART 2.Run the program again for the given muzzle velocity to find the angle for the maximum Range. Don't copy these runs. Run it a few times for yourself to see the angle you get is the maximum range. Then Show the output for the maximum case, as well as an 1 degree before the maximum angle and 1 degree after to show you really have the maximum range!. Be sure to note the max range and what the angle is OUTPUT EXPECTED PART 2: one set of data for the maximum range angle and two more runs for 1 degree before and after the maximum. Note the result shows you really have the maximum range! PART 3. Given the position of the castle, AT 1200m. What is the angle to just reach the castle wall. TWO OPTIONS HERE. Specify the angle to two decimals a. solve the equations by hand to find a precise angle (use formulas to figure it out) (two digit precision) Run this PUT THIS CALCULATION ON THE LAB b. Extra credit setup in the program code to solve the angle! in EITHER OPTION Run the result you get to be sure show the range is correct and what the angle is to precision of AT LEAST two decimals.? EG. 1145.45 Recall answer in degrees! OUTPUT EXPECTED FOR PART 3: The run for a range of 1200 meters and hand calculation for part a on lab. If you choose part b than only the run. PART 4. Enemy troops are located behind the castle at 2500 meters. Can our canon reach them? Why or why not. Explain! Paly with the program to answer OUTPUT EXPECTED FOR PART 4: the answer as a comment with reference to the proper run above. PART 5. The wall is 30m high what is the angle that will hit the top of a 30 m high wall and at a range of 1200m. Use previous equation for y in terms of x and with known values of v,x, ,g play with different values of to the equation to get y=301. Show the angle that works closely! Does it make sense your answer? Explain. OUTPUT EXPECTED FOR PART 5: The solution of the angle with x = 1200m and angle gives y =30m
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
