A2: Model-View-Controller (Java) -- JSketch

Due Fri Oct 19 at 5:00 PM

Synopsis

In this assignment you'll demonstrate your understanding of MVC by implementing a vector-drawing program, consisting of a canvas and tool palettes. Your program will selecting drawing properties, and drawing shapes on-screen.

This is a rough mockup that illustrates the features that you will implement, and the basic layout that you must use.
Mockup

Learning Goals

Requirements

The main area of your drawing program is a canvas that supports drawing shapes from the tool palette. Users can draw by selecting a shape from the list on the side, then clicking and dragging the mouse on the canvas to draw that shape. A shape "preview" is shown as the mouse is dragged, and the shape is complete when the mouse button is released (i.e. the first click sets the starting position, and the drag operation sets the width of the circle, or creates a line, depending on the shape being drawn, and the shape is complete when the mouse button is released).

Your drawing program will have the following layout and features:

The following functionality should be supported:

Technical Requirements

The following is a list of technical constraints and guidelines:

Additional Features (Mandatory, choose one or more features from the list below, totalling 10%).

Bonus Features: Resizing (Bonus, up to 10% for completing this feature)

In addition to making the canvas fixed-size, you may choose to enable scaling of the canvas to the window. This is an optional feature. If you complete it, we will reward up to 10 bonus marks on your assignment. If you exceed 100%, we will apply the "extra" marks to your lowest assignment.

This feature allows the user to toggle between scaling the canvas full-size (as above), or scaling the canvas and its contents to the window. You should add the following options to your toolbar:

Submission

Submit the following to your personal Git repository, in the A2/ subdirectory:

Assessment

Your submission will be assessed roughly as follows:

5%
Makefile compiles and runs program.
50%
Functional requirements, described above.
10%
MVC architecture (incl. at least 1 model and 2 views).
25%
Dynamic layout, and appropriate use of widgets.
10%
Additional features from the list above.
10%
Optional, maximum bonus for resizing.

Versions