Skip to content

Instantly share code, notes, and snippets.

@pokuwagata
Last active March 22, 2018 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pokuwagata/d55cde4bcbccd992ccece9bc418b6958 to your computer and use it in GitHub Desktop.
Save pokuwagata/d55cde4bcbccd992ccece9bc418b6958 to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
import java.util.List;
public class Plotter {
static class Point {
Double x;
Double y;
Point(Double x, Double y) {
this.x = x;
this.y = y;
}
Double getXCoordinate() {
return x;
}
Double getYCoordinate() {
return y;
}
}
static List<Point> points = new ArrayList<Point>();
static public void plot(Double x, Double y) {
points.add(new Point(x, y));
}
static public void render() {
System.out.println(points);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment