Your program will consist of a two Java files.
One file, called Server.java, will contain a class Server just four static methods:
/** Return the greatest common divisor of a and b. We assume that b is not 0. */ public static int gcd(int a, int b); /** Returns a boolean that is true if the given argument is a prime, False otherwise. */ public static boolean isPrime(int a); /** Prints out all the prime factors of the argument n, each factor with its correct degree. For example, if n is 360, it will print out factor exponent 2 3 3 2 5 1 */ public static void factors(int n); /** Returns true if the argument is a power of 2, false otherwise. */ public static boolean isPowerOf2(int a);The second file, called Client.java will contain a class Client with just the main method. In this method you will call the methods of the Server class to verify that they work properly. For example you may test gcd with arguments set one time to 48 and 30, another time to -48 and 15, another time to 48 and -21, another time to -48 and -23. You may test isPrime and isPowerOf2 by indicating for all numbers from 1 to 50 if they are prime, if they are a power of 2. You may test factors with n equal 360.
You will need to compile both the Server.java file and the Client.java file. Then you can execute the Client file.
Be sure to document your code.
Email your programs to your TA.