Reference no: EM132356644
Final Project
Introduction
The Final Project gives you the opportunity to apply the object-oriented software development skills you have acquired during the course to a significant but moderately-sized application. The following sections describe the general behavior of the application and the deliverable requirements for the project.
Starter code can be found on D2L > Content > Final Project.
Overview
We will be building an "MS Paint"-like application in Java called JPaint. It will have the following features:
- Pick a shape
o Ellipse
o Triangle
o Rectangle
- Pick a primary color
- Pick a secondary color
- Select shading type (outline only, filled-in, outline and filled-in)
- Click and drag to draw a shape
- Click and drag to select shapes
- Click and drag to move selected shapes
- Copy selected shapes
- Paste copied shapes
- Delete shape
- Undo last action
- Redo last action
- Group selected shapes
- Ungroup selected shapes
- Selected shapes have dashed outline
I am providing the GUI. You should need to write minimal GUI code. You will need to call into the Java API for drawing shapes. You will also need to write some handlers for click and drag events.
Features by Sprint
Sprint 1 (Ends on Week 4 at 5:30 pm)
- Draw a filled-in Rectangle
o When mouse is click-and-dragged while in Draw mode, a Rectangle will display on the screen. The Rectangle will match the direction and size of the mouse movement.
Sprint 2 (Ends on Week 6 at 5:30 pm)
- Draw Rectangles, Ellipses, and Triangles
- Draw shapes with various colors
- Draw shapes with various shading types
o Outline Only - Only shape outline will be drawn. Use Primary Color to draw this.
o Filled-In - Only the inside of the shape will be drawn - there will be no visible outline. Use Primary Color to draw this.
o Outline and Filled-In - Both the inside and the outline will be drawn. Use Primary Color for the inside and Secondary Color for the outline.
- Select a shape.
o In Select mouse mode, select any shapes that are touched by the invisible bounding box created by clicking and dragging to select. You can use (and share on D2L) a Collision detection algorithm that you find. The selection can be imprecise; when selecting, assume any shape (e.g. ellipse or triangle) have an invisible bounding box that surrounds the shape. You can use that bounding box for your collision detection calculation (this is much easier for you!).
o If you click a single point on the canvas or on a shape while in Select mode, that shape should be selected. This is the default behavior for collision detection - this is easier for you!
o At this point, nothing visible has to happen.
- Move a shape
o In Move Mouse Mode, clicking and dragging will offset any Selected shapes by the amount your mouse moves.
Sprint 3 (Ends on Week 8 at 5:30 pm)
- Copy
o Adds selected shapes to the "clipboard" (just jam them in a list somewhere).
- Paste
o If there is anything copied, paste it on the screen somewhere. You can paste it at origin (0, 0), the middle of the canvas, or somewhere else that makes sense. Do not paste to the same location; this will not be visible and will get marked as "not working".
- Delete
o Deletes the selected shape(s)
- Outline Selected Shapes
o Shapes that are selected will display with a dashed outline around them. These will need to be offset slightly so they don't overlap the shape. Move the start point up and to the left 5px and add 10px to the height and width. You can adjust these values depending on personal preference.
o The outline must be the same shape as the shape that's selected
Sprint 4 (Ends on Week 10 at 5:30 pm)
- Undo
o Undo the last operation. The following need to be Undoable:
• Draw
• Move
• Paste
• Delete
• Group
• Ungroup
- Redo
o Redo the last operation. See undo.
- Group
o Clicking this button will cause all Selected shapes to operate as a group.
o Shapes grouped together should be operated on as if they were one shape.
o To select a grouped shape, any part of the invisible bounding box around the shapes in the group can be selected.
- Ungroup
o Any selected shapes that are grouped shapes will no longer be grouped.
Non-functional requirements
- Must use at least 5 design patterns. Two may be the same kind of pattern.
- Report (see below for details).
- The application must be written in Java using the Java2 SDK 1.8 or higher.
- Only features and capabilities that are part of the Java2 SDK may be used in the application. No third-party software such as BlueJay or JBuilder class libraries or COM/CORBA components.
Attachment:- Java Project.rar