Requirements
The following items account for 80% of the total challenge points:
- See examples (especially "graphics-example")
- Add five or drawing object classes that can be added to drawing (e.g., "Add Circle")
- Add buttons to allow the new objects to be added to the drawing
- Each drawing object class should "implement" the "Drawing" interface (e.g., see Line.java)
- Each added drawable should have random position, size (if applicable), color and line thickness
- You can add standard shapes (e.g., "Rectangle") or design your own (e.g., "Turtle") -- in the latter case, you would change the "drawOn" method to draw a customized turtle relative to the position(s) of the turtle
The following items account for 20% of the total challenge points:
- See "user-prompted-drawing" example for demo on how to handle mouse clicks
- Add command (and corresponding button) to allow user to select and move an object (one mouse click to select object and another mouse click defining the new position of the object)
- For a composite drawing object like "Line", the entire line should move based on the vector going from the first mouse click to the second mouse click
- Rather than setting the drawing objects at a random position, allow the user to pick a point(s) defining the location(s) to place the drawing object
Rules
- Regarding MVC (model-view-controller) keep the view and controller code light -- the heavy code (the brains/engine) should be put in the model layer
- All of your objects (to be drawn) must implement the Drawable interface
- The model must be a composite (have components) -- see diagrams