Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ MinilabArrays The problem: You are to write a class called MinilabArrays. functions which will do the following It should have 2 1. The first
c++
MinilabArrays The problem: You are to write a class called MinilabArrays. functions which will do the following It should have 2 1. The first fiunction should be called mean1d and will receive a 1-dimensional array of ints and will return its mean (as a double). The function should > Use a for-loop to find the mean of the elements in the array. The formula for eachelement numberofelements mean is Return the mean 2. The second function should be called sum2d and will receive a 2-dimensional array of doubles and will return the sum of all elements (as a double). The function should: >Traverse the 2-D array, adding up all the elements. When finished, it will return the total. Testing: You can use the "driver program that is provided to run your classes (yours does not have a main function, so other programs will just call it). Be sure you see how arrays are created and passed in the driver program. Note: your calculation may be "off (for example, might give something like 529999999999994 when it is supposed to be 53), This is the result of C++ doing base 10 arithmetic in a base2 system, you can just leave it as is Please submit: ZIP your mlArrays project and submit using CanvasStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started