Question
1.. Please use c++ and please use a class to calculate the average don't use another method. 2. Please show your code. 3. Please show
1.. Please use c++ and please use a class to calculate the average don't use another method.
2. Please show your code.
3. Please show all outputs.
Calculate this example:
Given a set of the following discrete numbers/grades: 900, 55, 200, 34, 112, 55, 87, 256, 100, 100 1)
The "average" or "arithmetic mean" of the grades is the sum of all grades divided by the number of the grades.
USE THIS MATRIX TO CALCULATE AVERAGE
ave = {33, 43, 79, 52, 59, 48, 7, 76, 61, 62, 68, 29, 49, 22, 0, 23, 68, 20}
Requirements Continued:
This is an Object Oriented Programming (OOP) problem; therefore, you should try to solve the problem using classes.
You should read the data from the input file provided along with this project.
Your code must be properly documented and formatted.
PLEASE USE THIS ARRAY AND HAVE THE CODE READ THE ARRAY AND CALCULATE THE AVERAGE.
DON'T HAVE THE USER INPUT THE NUMBERS.
Given a set of the following discrete numbers/grades: 900, 55, 200, 34, 112, 55, 87, 256, 100, 100 1)
The "average" or "arithmetic mean" of the grades is the sum of all grades divided by the number of the grades.
ave = (33, 43, 79, 52, 59, 48, 7, 76, 61, 62, 68, 29, 49, 22, 0, 23, 68, 20)/18 = 40.9
=
Requirements Continued:
This is an Object Oriented Programming (OOP) problem; therefore, you should try to solve the problem using classes.
You should read the data from the input file provided along with this project.
Your code must be properly documented and formatted.
HERE IS AN EXMPLE OF CODE: IT NEEDS TO READ THE ARRAY ABOVE AND CALCULATE THE AVERAGE.
IT NEEDS TO BE A CLASS DOING THIS.
PLEASE READ FULLY THIS IS AN EXAMPLE THAT NEEDS TO BE MOFIFIED.
SHARE CODE AND SHOW OUTPUT PLEASE C++ ONLY.n
USE THESE NUMBERS my_array ={(33, 43, 79, 52, 59, 48, 7, 76, 61, 62, 68, 29, 49, 22, 0, 23, 68, 20} no user input calculate average using given
EXAMPLE Only modify:
#includeusing namespace std; class MClass { public: int n,i,arr[50]; float s=0; }; int main(){ //create an object for MClass MClass obj; obj.s=0; obj.i=0; cout<<"Number You Want To Enter: "; cin>>obj.n; cout<<"Enter "< >obj.arr[obj.i]; // sum of each number obj.s=obj.s+obj.arr[obj.i]; } // here calculate the avg float avg=obj.s/obj.n; cout<<"Arithmetic Mean = "<
Step 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