Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /*
  2. FunctionModeRunner.java     MrG     2013.0521
  3. purpose:    graph y=ax^2+bx+c as in function mode on a TI83
  4. required files: FunctionModeRunner.java             main class
  5.         FunctionMode.java               derived class
  6.         StdDraw.java                    graphics class
  7. translator: javac FunctionModeRunner.java
  8. interpreter:    java FunctionModeRunner a b c xMin xMax yMin yMax
  9. */
  10. public class FunctionModeRunner
  11. {
  12.     public static void main(String[] args)
  13.     {
  14.         double a = Double.parseDouble(args[0]);
  15.         double b = Double.parseDouble(args[1]);
  16.         double c = Double.parseDouble(args[2]);
  17.         double xMin = Double.parseDouble(args[3]);
  18.         double xMax = Double.parseDouble(args[4]);
  19.         double yMin = Double.parseDouble(args[5]);
  20.         double yMax = Double.parseDouble(args[6]);
  21.  
  22.         StdDraw.setXscale(xMin, xMax);
  23.         StdDraw.setYscale(yMin, yMax);
  24.  
  25.         FunctionMode TI83 = new FunctionMode(a,b,c);
  26.         TI83.axes(xMin,xMax,yMin,yMax);
  27.         TI83.plot(xMin,xMax);
  28.     }
  29. }