public class test
{
public static void main(String[] args)
{
Rectangle box = new Rectangle(45, 90, 60, 90);
box.grow(20, 20);
system.out.println(box.getX());
system.out.println("exected: 25");
system.out.println(box.getY());
system.out.println("exected: 70");
}
}
Rectangle frontFace = new Rectangle(20, 30 ,100, 40);
Line leftLine = new Line(20, 30, 50, 10);
Line topLine = new Line(50, 10, 150, 10);
Line middleLine = new Line(120, 30, 150, 10);
Line rightLine = new Line(150, 10, 150, 50);
Line bottomLine = new Line(120, 70, 150, 50);
frontFace.draw();
leftLine.draw();
topLine.draw();
middleLine.draw();
rightLine.draw();
bottomLine.draw();
box.setColor(new Color(255, 0, 0));
box.draw();
box2.setColor(new Color(0, 255, 0));
box2.fill()