Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Sum2002 M1: Simple Drawing Editor
In this project, you will provide a simple drawing editor.
Your users will want to draw lines, rectangles, and ellipses. You will provide them an interface where they can:
- Select a tool: A line-drawing tool, a rectangle-drawing tool, or a circle-drawing tool.
- If they choose the line-drawing tool, expect the user to click for the first point, drag to the second point, then release. Draw a line between the two points.
- If they choose the rectangle-drawing tool, expect the user to click for the upperLeft point, drag to the lowerRight point, then release. Draw a rectangle between the two points. (If the user drags up and/or left, you can either do nothing or still give them a reasonable rectangle.)
- If they choose the circle-drawing tool, expect the user to click for the center point, drag to a point on the circle (i.e., the radius from the point), then release. Draw a circle defined by the center and the radius.
- You must also provide a Stop button that ends the editor session.
- All objects are black lines with transparent fills.
You are not supporting deleting objects, resizing objects, or moving objects at this time.
The graders will start your system with DrawingEditor open. You should clear a section of the screen (say, 400 x 400) and draw the buttons for your tools and the Stop button, then start accepting user input.
In class, please turn-in well-documented, hardcopy source code (at least two lines of comments for each non-accessor method, in-line comments at significant portions) with your name and student number on it. In addition, before class time, turn-in your code using the Summer 2002 Turnin Information.
- 20% Good Smalltalk style: 10% Good reuse of existing code, 5% variable names start with lowercase letters, 5% good comments.
- 80% Correct implementation:
- 10 A good, usable basic layout of drawing area and tools buttons
- 20 Handles lines correctly
- 20 Handles rectangles correctly
- 20 Handles circles correctly
- 10 Stops when the stop button pressed.
Questions on Sum2002 M1 Milestone
Link to this Page