public abstract class Shape
extends java.lang.Object
Constructor and Description |
---|
Shape(int x,
int y)
Constructor sets the point where the shape draws.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
draw()
Abstract method definition to print dimension(s) of a shape subclass
object to the terminal window.
|
int |
getX()
Returns the x-coordinate where the shape draws.
|
int |
getY()
Returns the y-coordinate where the shape draws.
|
void |
position()
Prints the position of the shape to the terminal window.
|
void |
printIt()
Prints the statistics of a shape to the terminal window.
|
void |
setX(int x)
Sets the x-coordinate where the shape draws.
|
void |
setY(int y)
Sets the y-coordinate where the shape draws.
|
public Shape(int x, int y)
x
- the x-coordinate where the shape drawsy
- the y-coordinate where the shape drawspublic abstract void draw()
public int getX()
public int getY()
public void position()
public void printIt()
public void setX(int x)
x
- the x-coordinate where the shape drawspublic void setY(int y)
y
- the y-coordinate where the shape draws