public class NumberUtilities { public static String getRange(int start) { String answer = ""; for(int i = 0; i < start; i ++) { String string = String.valueOf(i); answer += (string); } return answer; } public static String getRange(int start, int stop) { String answer = ""; for(int i = start; i < stop; i++) { String string = String.valueOf(i); answer += string; } return answer; } public static String getRange(int start, int stop, int step) { String answer = ""; for(int i = start; i < stop; i += step) { String string = String.valueOf(i); answer += string; } return answer; } public static String getEvenNumbers(int start, int stop) { String answer = ""; for(int i = start; i < stop; i ++){ if(i % 2 == 0) { String string = String.valueOf(i); answer += string; } } return answer; } public static String getOddNumbers(int start, int stop) { String answer = ""; for(int i = start; i < stop; i ++){ if(i % 2 != 0){ String string = String.valueOf(i); answer += string; } } return answer; } public static String getExponentiations(int start, int stop, int exponent) { String answer = ""; for(int i = start; i <= stop; i ++) { double m = i; String string = String.valueOf(Math.round(Math.pow(m, exponent))); answer += string; } return answer; } }