Now calculates range.
This commit is contained in:
parent
64174d5c8e
commit
d7b8febf01
@ -43,6 +43,7 @@ public class MMMCalc {
|
|||||||
calcMean();
|
calcMean();
|
||||||
calcMedian();
|
calcMedian();
|
||||||
calcMode();
|
calcMode();
|
||||||
|
calcRange();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
System.out.println("You did not mention any variables. Use the -h argument for help.");
|
System.out.println("You did not mention any variables. Use the -h argument for help.");
|
||||||
@ -95,4 +96,13 @@ public class MMMCalc {
|
|||||||
|
|
||||||
System.out.println("Mode: " + mode + " (frequency: " + modeFreq + ")");
|
System.out.println("Mode: " + mode + " (frequency: " + modeFreq + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void calcRange() {
|
||||||
|
// FIXME
|
||||||
|
int l = numArray.length -1;
|
||||||
|
float range = 0;
|
||||||
|
range = numArray[l] - numArray[0];
|
||||||
|
|
||||||
|
System.out.println("Range: " + range);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user