Question: It is in JAVA. I have to correct this one and make a tester. (ClockSolverTester.java) PLEASE HELP public class ClockSolver { /** * Class field

It is in JAVA. I have to correct this one and make a tester. (ClockSolverTester.java) PLEASE HELP

public class ClockSolver { /** * Class field definintions go here */ private final double MAX_TIME_SLICE_IN_SECONDS = 1800.00; private final double DEFAULT_TIME_SLICE_SECONDS = 60.0; private final double EPSILON_VALUE = 0.1; // small value for double-precision comparisons

/** * Constructor * This just calls the superclass constructor, which is "Object" */ public ClockSolver() { super(); }

/** * Method to handle all the input arguments from the command line * this sets up the variables for the simulation */ public void handleInitialArguments( String args[] ) { // args[0] specifies the angle for which you are looking // your simulation will find all the angles in the 12-hour day at which those angles occur // args[1] if present will specify a time slice value; if not present, defaults to 60 seconds // you may want to consider using args[2] for an "angle window"

System.out.println( " Hello world, from the ClockSolver program!! " ) ; if( 0 == args.length ) { System.out.println( " Sorry you must enter at least one argument " + " Usage: java ClockSolver [timeSlice] " + " Please try again..........." ); System.exit( 1 ); } Clock clock = new Clock(); }

/** * The main program starts here * remember the constraints from the project description * @see http://bjohnson.lmu.build/cmsi186web/homework04.html * @param args String array of the arguments from the command line * args[0] is the angle for which we are looking * args[1] is the time slice; this is optional and defaults to 60 seconds */ public static void main( String args[] ) { ClockSolver cse = new ClockSolver(); Clock clock = new Clock(); double[] timeValues = new double[3]; cse.handleInitialArguments( args ); while( true ) { break; } System.exit( 0 ); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!