$30
CS264 - Software Design
Assignment 3
This Assignment is worth 10% of the Software Design CA Component.
This is an open-book, graded assignment. You may use online resources for reference purposes only
to help with the assignment. Please cite all references as comments in your submissions. You cannot
directly reuse C# solu5on code from online sources. You must not engage with another student, in
person or electronically (phone, social media, etc.) to secure assistance with this assignment. If
you do so you will receive an automa5c fail (0%). We will perform similarity checks on submiBed
assignments to check for collaboraCve efforts. A reasonable aBempt at this assignment will gain you
10% of your conCnual assignment marks. It is possible to gain extra credit (up to a maximum of 5%)
for this assignment.
Assignment 03 - So)ware Design and Design PaJern Implementa5on with C#
You are required to design and develop an interacCve (command line) user interface for the console
applicaCon that you developed in Assignment 02. The user interface should provide simple keyboard
funcConality to (i) generate different random shapes that are added to the canvas, (ii) display the
current canvas to the console, (iii) save the canvas to a file, (iv) implement Undo-Redo funcConality
in your interacCve session.
Note that you do not need to implement a graphical user interface for this assignment, i.e. you are
not building a graphics app. This assignment is about designing and developing the classes and
methods associated with a typical drawing app data model and implemen5ng a So)ware Design
PaJern.
Assignment 03 - Requirements
You are required to implement the following core funcConality for this assignment:
1. You must implement funcConality for interacCvely creaCng the canvas drawing using keyboard
commands to create random shapes. You do not have to include commands for canvas management (i.e creaCng and using different canvases). The User Interface may include “shape” commands for creaCng shapes, such as commands to (A)dd <shape> shapes to the canvas, and “canvas” commands such as (D)isplay the canvas to the console (i.e. write the SVG code for the canvas
to the console), (S)ave the canvas to a file (i.e. save the SVG output for the current canvas to a
file), and “undo-redo” commands such as (U)ndo (i.e. undo the last shape command) and (R)edo
Assignment Release Date: 01-11-2021
Submission Due Date: 19-11-2021
Feedback Due Date (esCmated): 03-12-2021 (for assignments that make Due Date)
Support Laboratories Labs 05-07 (Three Weeks)
Total Mark: 10%
(i.e. redo the last shape command), and “session” commands like (Q)uit (i.e exit the applicaCon)
and (H)elp (i.e. give list of UI commands). A sample session might look like the following:
$ dotnet run app
Canvas created - use commands to add shapes to the canvas
> A circle
Circle (R=100,X=200,y=200) added to canvas.
> A square
Square (L=100,X=200,y=200) added to canvas.
> U
Square removed from canvas.
> R
Square (L=100,X=200,y=200) added to canvas.
H
Commands:
H Help - displays this message
A <shape> Add <shape to canvas
U Undo last operation
R Redo last operation
C Clear canvas
Q Quit application
> Q
Goodbye!
2. You must implement the Undo-Redo funcConality for shape commands using either the Memento or Command Socware Design PaBern. You must clearly describe in your applicaCon comments which paBern you are using and how it is implemented. Failure to specify the paBern design details using appropriate comments, or not using a design paBern will reduce marks allocated.
3. You must include a class diagram (PDF format) for your applicaCon. This should be derived from
the codebase using, for example, the automated PUML extensions for VS Code. We will use these
diagrams to compare the class structure to the socware design paBern chosen to implement
Undo-Redo.
Assignment 03 - Addi5onal Requirements for Extra CA Credit (5%)
If you manage to develop and design and soluCon to this assignment before the deadline you may
also wish to include commands (together with implementaCon) for THREE of the following: (i) include commands specifying parameters to create specific shapes (other than randomly created
shapes) as part fo the command, e.g. A circle (R=100,X=200,y=200), (ii) include commands
for applying basic styles for generated shapes, (iii) include commands for canvas manipulaCon, i.e
translaCng, rotaCng, skewing and scaling the canvas, and (iv) include commands to add styled and
formaBed text to the canvas, and (v) include funcConality (and command) for loading a a previously
saved canvas previously saved to a file.
Successfully compleCng this extra funcConality will result in awarding an extra 5% towards your CA
Total.
IMPORTANT SUBMISSION DETAILS
Please indicate the Opera5ng System (Linux/Windows/MacOS/Online) and IDE (e.g. VS Code) version used for tes5ng (as a comment in your submiJed code). If you use an online IDE please clearly
specify the IDE (hBp://repl.it) and provide a link where possible.
All work must be submiBed via Moodle (see "Assignments" secCon for submission). Work submiBed
via other means will not be accepted unless you have prior arrangements with the Head Demonstrator (Behnam Faghih). All work MUST be submiBed by the due-date deadline. Late submissions will
not be accepted.
The assignment submission is a zip file named “assignment-03-xxxxxxxxx.zip” (where “xxxxxxxxx” is
your student id) containing soluGon files, e.g. named “svgundoredo.cs”, “Program.cs”, etc. together
with any other resources used in the assignment soluGon. Please ensure that all external files use relaGve directory referencing, rather than hard-coding the files’ locaGon.