Created
February 22, 2013 02:52
-
-
Save anonymous/5010382 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
package shapes; | |
import interfaces.ComparableShape; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
public abstract class Shape implements ComparableShape{ | |
private int x, y; | |
private Color lineColor; | |
//public abstract double getArea(); | |
public Shape(int x, int y, Color lineColor) { | |
this.x = x; | |
this.y = y; | |
this.lineColor = lineColor; | |
} | |
public abstract void draw(Graphics g); | |
public abstract boolean containsLocation(int x, int y); | |
public int getX() { | |
return x; | |
} | |
public void setX(int x) { | |
this.x = x; | |
} | |
public int getY() { | |
return y; | |
} | |
public void setY(int y) { | |
this.y = y; | |
} | |
public Color getLineColor() { | |
return lineColor; | |
} | |
public void setLineColor(Color lineColor) { | |
this.lineColor = lineColor; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment