// This import was necessary for how I decided to call the methods three more times. // It is not required necessary for the project; other solutions could suffice. import java.util.Random; public class Project5DriverSolution { public static void main (String[] args) { PolynomialSolverSolution poly = new PolynomialSolverSolution(); NthRootSolverSolution nth = new NthRootSolverSolution(); MonomialSolverSolution mono = new MonomialSolverSolution(); BasicCalculatorSolution basic = new BasicCalculatorSolution(); Random random = new Random(); AdvancedTrigCalculatorSolution advtrig = new AdvancedTrigCalculatorSolution(); // The above reference is used for all trigonometric functions // because the TrigCalculatorSolution class is abstract, // so it needs an instance of a child class to access its methods. // Explicitly required functionality. System.out.println("The solution to (6x-40)^7 = 953 is " + poly.solveEquation(6, -40, 7, 953)); System.out.println("The solution to (12x+96)^0.2 = 3 is " + nth.solveEquation(12, 96, 5, 3)); System.out.println("The solution to (10x+25) = 50 is " + mono.solveEquation(10, 25, 1, 50)); System.out.println("The sine of 1.05 is " + advtrig.sine(1.05)); System.out.println("The cosine of 3.14 is " + advtrig.cosine(3.14)); System.out.println("The cosecant of 0.65 is " + advtrig.cosecant(0.65)); System.out.println("The tangent of 0.3 is " + advtrig.tangent(0.3)); System.out.println("The secant of 10 is " + advtrig.secant(10)); System.out.println(); // Showing that BasicCalculatorSolution works. System.out.println("1 + 12 = " + basic.add(1,12)); System.out.println("6 ^ 5 = " + basic.power(6,5)); System.out.println("7 * 56 = " + basic.multiply(7,56)); System.out.println(); // Calling each method three times to ensure proper functionality. for (int i=0; i<3; i++) { int[] num = new int[16]; for (int j=0; j