questionproduce an average class with a public


Question

Produce an Average class with a public data member to collect the sum of integer entries and a public data member to hold the double average of the sum of the 10 integers.

Public class method to get each integer number input.
Public class method to calculate an average of the numbers input.

Public class method to output an average of the numbers input.

Main ( ) function that instantiates one Average object, and contains for loop to take 10 inputs and calls to calculation and output method. The next chapter covers up looping; however, you should be able to build a for-loop to accomplish the 10 inputs. A for loop in C# is no different than a for-loop in C++ or Java.

Internal Documentation.
An example of possible output would look like this:
Enter an integer value: 1
Enter an integer value: 2
Enter an integer value: 3
Enter an integer value: 4
Enter an integer value: 5
Enter an integer value: 6
Enter an integer value: 7
Enter an integer value: 8
Enter an integer value: 9
Enter an integer value: 10
The average is 5.5, the sum of 10 numbers is 55

 

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: questionproduce an average class with a public
Reference No:- TGS0443805

Expected delivery within 24 Hours