import java.util.*; import javax.swing.*; import java.awt.*; /*Base class for shape*/ public class Shape { private Color color = new Color(0,0,0); private int xLocation = 0; private int yLocation = 0; private int length; private int width; private double area; private double perimeter; public void setLength(int l) { length = l; } public void setWidth(int w) { width = w; } public int getLength() { return length; } public int getWidth() { return width; } public void setArea(double a) { area = a; } public double getArea() { return area; } public void setPerim(double p) { perimeter = p; } public double getPerim() { return perimeter; } public void setShapeColor(Color c) { color = c; } public Color getShapeColor() { return color; } public void scaleShape(int xScale, int yScale) { length = length*xScale; width = width*yScale; } public void translateShape(int x, int y) { xLocation = x; yLocation = y; } public int[] getLocation() { int[] loc = {xLocation, yLocation}; return loc; } }