-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSquare.java
25 lines (22 loc) · 834 Bytes
/
Square.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.awt.*;
public final class Square extends Shape {
public static final int INT = 3;
public static final int INT1 = 4;
public static final int INT2 = 5;
public static final int INT3 = 6;
public static final int INT4 = 7;
// constructor Square
public Square(final String[] shapeParameters) {
super(shapeParameters);
points = new Point[1];
points[0] = new Point(Integer.parseInt(shapeParameters[1]),
Integer.parseInt(shapeParameters[2]));
distance1 = Integer.parseInt(shapeParameters[INT]);
outlineColor = convertColor(shapeParameters[INT1], shapeParameters[INT2]);
innerColor = convertColor(shapeParameters[INT3], shapeParameters[INT4]);
}
@Override
public void accept(final Visitor v) {
v.visit(this);
}
}