Last active
March 22, 2018 14:57
-
-
Save pokuwagata/696c6c2ff5bba98a4111a708a63c59ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Plotter { | |
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 List<Point>(); | |
static public void plot(Double x, Double y) { | |
points.add(new Point(x, y)); | |
} | |
static public void render() { | |
System.debug(points); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment