Added help argument.
This commit is contained in:
parent
c170924b87
commit
64174d5c8e
@ -15,6 +15,12 @@ public class MMMCalc {
|
||||
System.out.println("Welcome to MMMCalc v0.1, a simple tool for basic statistics calculations.\n" +
|
||||
"This software is licensed under the GNU GPLv3 license and comes WITHOUT WARRANTY.\n");
|
||||
if(args.length > 0) {
|
||||
if(args[0].equals("-h")) {
|
||||
System.out.println("Usage:\n" +
|
||||
" MMMCalc [options] [variables]\n\n" +
|
||||
"Options:\n" +
|
||||
" -h -- Show this help information.\n");
|
||||
} else {
|
||||
float sNum = 0;
|
||||
numArray = new float[args.length];
|
||||
|
||||
@ -37,8 +43,9 @@ public class MMMCalc {
|
||||
calcMean();
|
||||
calcMedian();
|
||||
calcMode();
|
||||
}
|
||||
} else {
|
||||
System.out.println("You did not mention any variables.");
|
||||
System.out.println("You did not mention any variables. Use the -h argument for help.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user