// Use the UW graphics library import uwcse.graphics.*; /** * A class to draw shapes made of squares * * @author your name here */ public class DrawingWithSquares { // Use a Pen to draw // Do we need a constructor? /** * Draw a square of side length size and rotated by angle *
* The center of the square is the home position of the pen * * @param size * the length of the side of the square (in pixels) * @param angle * the angle of rotation of the square (counted counterclockwise) */ public void drawSquare() { // Bring the pen to the home position (=center of the square) // Bring the pen on the upper right corner of the square // Start drawing // top side // left side // bottom side // right side } /** * Draw a set of 9 rotated squares. The first square is drawn with a 0 * degree angle, the second with a 10 degree angle, the third with a 30 * degree angle, etc... * * @param size * the length of the side of the squares (in pixels) */ public void drawSquarePattern() { } /** * Draw 8 sets of rotated squares, varying in size from 25 to 200 in * increments of 25 */ public void drawSquarePatterns() { } /** Clear the screen */ public void clearScreen() { } /** * Entry point of the program */ public static void main(String[] args) { DrawingWithSquares dws = new DrawingWithSquares(); // type here the actions that you want to test e.g. dws.drawSquarePatterns(); } }