/**To test BaseMethods methods * uncomment as necessary */ import java.util.*; public class TestBaseMethods { /** * @param args */ public static void main(String[] args) { int [] myArray={2,3,5,8,9,10,14,17}; //System.out.println("The array of prefix averages using quadratic algorithm is: "); //BaseMethods.displayArray(BaseMethods.prefixAverages1(myArray)); //System.out.println("The array of prefix averages using linear algorithm is: "); //BaseMethods.displayArray(BaseMethods.prefixAverages2(myArray)); // Scanner standardInput = new Scanner(System.in); //System.out.println("To test the factorial funtion x**N. Input x and N:"); //int x = standardInput.nextInt(); //int N = standardInput.nextInt(); // System.out.println("The value of x**N using linear algorithm is: "+ BaseMethods.power1(x,N)); // System.out.println("The value of x**N using logarithmic algorithm is: "+ BaseMethods.power2(x,N)); // System.out.println("the sum of squares up to 100 is " + BaseMethods.squares2(100)); System.out.println("the integer square root of 125 is " + BaseMethods.intSqrt2(125)); } }