A simple java application that finds the total, maximum, minimum, range, and average of a set of user input data.
-
Data.java A java API that requires an ArrayList of type Double. Included Features:
getSum()
- Returns the sum of values in the arrayListgetAverage()
- Returns the average of all values in ArrayList. NOTE: the value returned is not rounded or truncated.getMinimum()
- Returns the lowest value of all values in ArrayListgetMaximum()
- Returns the maximum value of all values in ArrayListSetList(ArrayList<Double> dataSet)
- Overrides the current ArrayList with new datagetList()
- returns a copy of the dataSetgetRange()
- returns the range of values in DataSet
-
DataFactory.java A java file that "automates" the data process. Requires user-input of all values that will go into the ArrayList.
-
DataTest.java A JUnit test of functions found in Data.java
- Data.java
To use Data.java, simply include
Data.java
in the same directory as your project. After that, declare a new instance of Data,Data data = new Data(ArrayList<Data> dataSet);
All methods can then be called usingdata.
MIT