OverviewThe intent of this program is to give you experience writing classes and begin to start developing algorithms to solve problems.Learning ObjectivesBe able to write a class complete with...

1 answer below »



Overview




The intent of this program is to give you experience writing classes and begin to start developing algorithms to solve problems.








Learning Objectives







  • Be able to write a class complete with fields and methods.



  • Be able to calculate the minimum and maximum number seen.



  • Be able to calculate the product, sum, and average of a series of numbers.










Assignment




You will be taking an already written class and using it to solve a problem.








Template




Use the following code in a file called Statistics.java. Do not change the template. Only modify the template where there is a TODO comment. You must ensure that all output matches the sample outputs.














Hints







  • You will need to initialize your running total for sum to 0, and you will need to initialize your running total for product to 1.



  • Notice that getAverage returns a double! You will need to perform floating point arithmetic to get the average, NOT integer arithmetic.



  • The minimum and maximum will get their values in the addValue function. However, they will still need to have an initial value set in the constructor in case the user provides no values when running the program.



  • If there is one value added, it will be both the minimum and maximum value. After more than one value is added, then you will need to compare the added value with the current minimum and maximum. You must use mutual exclusivity in this case. After the first value is added, another added value cannot be both the minimum and maximum value.













Answered Same DayNov 28, 2022

Answer To: OverviewThe intent of this program is to give you experience writing classes and begin to start...

Vikas answered on Nov 29 2022
36 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here