Whatever calculations your program is making


Create a class Stats that keeps a running tally of statistics (min, max, and average) for double values.

You might instantiate it like this:
Stats *dataStats = new Stats();

Over the course of whatever calculations your program is making, you might make several function calls like this:
dataStats->registerValue(3.14);
to tell your object to consider some new value (in this case 3.14). At any point, you should be able to ask the object "what is the min so far,?" "what is the max so far?," "what is the average so far,?" and "what numbers have been registered so far?"

Be sure to use data encapsulation.

Design a main method to test your class.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Whatever calculations your program is making
Reference No:- TGS0109568

Expected delivery within 24 Hours