01: /**
02:    This program computes square roots of input values
03:    supplied by a loop.
04: */
05: public class RootApproximatorHarness2
06: {  
07:    public static void main(String[] args)
08:    {  
09:       final double MIN = 1;
10:       final double MAX = 10;
11:       final double INCREMENT = 0.5;
12:       for (double x = MIN; x <= MAX; x = x + INCREMENT)
13:       {  
14:          RootApproximator r = new RootApproximator(x);
15:          double y = r.getRoot();
16:          System.out.println("square root of " + x
17:                + " = " + y);
18:       }
19:    }
20: }