for the class ArrayAverage write a code that calculates the average of the listed numbers with a double result for the class ArrayAverageTester write a for each loop and print out the result

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

for the class ArrayAverage write a code that calculates the average of the listed numbers with a double result

for the class ArrayAverageTester write a for each loop and print out the result

public class ArrayAverage
private int[] values;
public ArrayAverage (int[] theValues)
{
values = theValues;
}
%3D
public double getAverage()
{
// your code goes here!
Transcribed Image Text:public class ArrayAverage private int[] values; public ArrayAverage (int[] theValues) { values = theValues; } %3D public double getAverage() { // your code goes here!
public class ArrayAverageTester extends ConsoleProgram
{
public void run()
{
int[] numArray = {12, 17, 65, 7, 30, 88};
// Create an ArrayAverage object and print the result
}
}
Transcribed Image Text:public class ArrayAverageTester extends ConsoleProgram { public void run() { int[] numArray = {12, 17, 65, 7, 30, 88}; // Create an ArrayAverage object and print the result } }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,