Question: please just do the c++ programming ,thank u! A vertical cross section of a racing boat is shown in the figure below. The mast of
please just do the c++ programming ,thank u!

A vertical cross section of a racing boat is shown in the figure below. The mast of the boat has a maximum height H=25ft. The wind force f(z) exerted per foot of mast and measured in lbf / ft can be expressed as a function of distance above the boat's deck (z). The equivalent total wind force F can be calculated as a finite integral. f(z)=195(7+zz)eH3zF=0Hf(z)dz Use a uniform partition with equally spaced intervals over a z-value range [0, 25] to determine the total wind force F using the methods: 1. Upper and Lower Sums, 5 intervals (note: the figure shows the variation of the force f with height z and indicates that the maximum force occurs at z=5ft ) 2. Trapezoid rule, 5 intervals 3. Romberg algorithm, up to R(2,2). 4. C++ program based on Romberg pseudocode up to R(20,20) 5. Perform an error analysis: compare results from (1), (2), (3) with (4) value procedure Romberg (a,b,n) Legend: hbaa and b are the integration limits r00(h/2)[f(a)+f(b)] - ri,j is a two-dimensional array for the R(n,n) terms for i=1 to n do n is last index id of R(n,n) hh/2 sum 0 for k=1 to 2i1 step 2 do za+kh sum sum +f(z) end for ri021ri1,0+( sum )h for j=1 to i do rijri,j1+(ri,j1ri1,j1)/(4i1) end for return rm end procedure Romberg - For questions 1, 2, and 3 perform hand calculations; record the answers in the shaded boxes of the provided Excel file; scan the hand calculations; and submit on Avenue the scanned hand calculations - For question 4 - Create a C++ source file that uses a "define" statement for the function f(z), and has a main program that provides values for a,b, and n; calls a separate function named "romberg" that uses the pseudocode shown above; and displays the value of the R[n][n] term passed back from the "romberg" function. - Run the C++ program for n=2 and n=20 and paste in the Excel file the corresponding two screen captures of your C++ program output (console); without screen captures the answer to C++ question will not be credited
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
