Question: need the C++ code on the part 4 ! Assignment specs: In this assignment, you will demonstrate your knowledge of arrays. You are not allowed

 need the C++ code on the part 4 ! Assignment specs:In this assignment, you will demonstrate your knowledge of arrays. You arenot allowed to use vectors anywhere in your code. In fact, do

need the C++ code on the part 4 !

Assignment specs: In this assignment, you will demonstrate your knowledge of arrays. You are not allowed to use vectors anywhere in your code. In fact, do not use the word vector anywhere, including comments In engineering simulations, we often want to generate a floating-point sequence of values with a specified mean and variance. The randFloat function below allows us to generate a random sequence between limits a and b, but it does not allow us to specify the mean and variance. By using results from probability, the following relationships can be derived between the limits of a uniform random sequence and its theoretical mean and variance 21 2 (a+b) 2 2 (b-a) 12 /*This function generates a random double value between a and b*/1 double randFloat (double a, double b) CT return a + (static.cast (rand()) / RANDMAX) * (b - a) Part 1: Write a program that uses the randFloat function given above to generate sequences of random floating-point values between 4 and 10. You should now use two specific sized sequences; sequences of 100 and 10,000. Then compare the computed mean and variance to the theoretical values computed (using formulas above). There should be no user input for this section. The expected output should be seen for both sequences: theoretical mean, practical mean, theoretical variance, practical variance. The values should be separated by spaces.I Example: Given: theoretical mean = 2.0, practical mean practical variance = .76' 2.1, theoretical variance = .75, and. The output would be: 2.0 2.1 0.75 0.76 Output should be seen with this output style for both sequences, each started on a newline.1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!