Wednesday, January 28, 2015

PlotFilter.java in programe



PlotFilter.java

 
public class PlotFilter 
{ 
 public static void main(String[] args) 
  {
        double x0 = StdIn.readDouble();
        double y0 = StdIn.readDouble();
        double x1 = StdIn.readDouble();
        double y1 = StdIn.readDouble();
        StdDraw.setXscale(x0, x1);
        StdDraw.setYscale(y0, y1);
                    StdDraw.show(0);
        while (!StdIn.isEmpty()) 
        {
            double x = StdIn.readDouble();
            double y = StdIn.readDouble();
            StdDraw.point(x, y);
        }
                         StdDraw.show(0);
    }
}

No comments:

Post a Comment