I'm really stuck on how to simply plot a point in a program called WinPlotter. Apparently, the points are supposed to appear after calling it through the super class, but I can't even get one dot to appear on the grid. Here's my code thus far:
public class Point extends Shape {
public void draw(WinPlotter plotter) {
// TODO Auto-generated method stub
plotter.drawPoint(xo, yo);
}
public Point(double xo, double yo, Color c) {
// TODO Auto-generated constructor stub
super(xo, yo, c);
}
And here's the superclass itself:
public Color c;
protected double xo;
protected double yo;
public abstract void draw(WinPlotter plotter);
public void setColor(Color c) {
c = Color.RED;
}
public void setPenColor(WinPlotter plotter){
plotter.setPenColor(0, 0, 0);
}
public Shape(double xo, double yo, Color c) {
// TODO Auto-generated constructor stub
}
I seem to be confused on what I should place in the Shape() method. I should modify the method to the "shape" of the dots. I tried random variables. But nothing is showing. Any hints/help would be appreciated.