import java.util.Scanner; /** A program to test arithmetic * * @author Duncan Buell * * Program written: 14 October 2007 */ public class Main3 { public static void main (String[] args) { int numSegments; double leftEnd,rightEnd,theValue; Scanner console = new Scanner(System.in); ComputeIntegral theIntegral = new ComputeIntegral(); System.out.printf("Left Endpoint?%n"); leftEnd = console.nextDouble(); System.out.printf("Left Endpoint is %f%n",leftEnd); System.out.printf("Right Endpoint?%n"); rightEnd = console.nextDouble(); System.out.printf("Right Endpoint is %f%n",rightEnd); System.out.printf("Number of Segments?%n"); numSegments = console.nextInt(); System.out.printf("Number of Segments is %d%n",numSegments); theValue = theIntegral.doIntegral(leftEnd, rightEnd, numSegments); System.out.printf("The Integral is %f%n",theValue); } } // public class Main3