Assignment 1

This is your first assignment that will contribute to your grade for the semester. It is worth 15% of your overall grade. You are asked to write a working animation.

Specifications and requirements may change for clarification and simplification purposes however the essence of the assignment will be the same

Assignment 1

This will detail, for your first assignment:

  • Specification: What is expected from your code.
  • Marking: The marking scheme for the assignment.
  • Submission: Submission details including submission date.

Assignment Advice

Read the specification carefully.

Start working on the assignment early.

When you think you are ready to submit check the following:

  • Ensure you have all covered all the elements mentioned in the marking scheme.

  • Ensure specifically that your indentation is consistent.

  • Write comments to explain what your animation does and particularly how tricky code works and what it does.

  • Ensure that your name, student number and description of what your code does is written at the top of the main sketch file.

  • Ensure that you have named the submission (zip) file according to the prescribed naming convention.


In this assignment, you are asked to write code to produce a dynamic animation with user interaction (i.e mouse and Swing dialog box) of your choice in Processing (Java).

The aim of the assignment is for you to demonstrate your understanding of structures seen so far, so you are asked to include the following:

  • The usual Processing class containing the draw(), setup(), etc.

  • Use of selection (if)

  • Use of iteration (loops).

  • Use of String methods (e.g. equals, length, substring, etc).

  • Use of Processing methods e.g. mousePressed.

  • Use of at least one bespoke method you defined and wrote yourself e.g. eyes(), drawX().

The complexity of the entire code is important, i.e. the more complex the code, the more marks you will achieve. (see marking scheme).

Marking Scheme

There are two components to your overall mark:

  • Structure of code
  • Complexity of code

Please read below regarding self assessment & interviews.

Structure of Code "rubric" (100 Marks)

Part Description Marks
a Comments, indentation, naming, structure of code, includsion of Readme and Reflection. (5)
b Working animation
i.e. inclusion of the usual Processing class containing the draw(), setup(), etc.
c Use of if statements (10)
d Use of loops (20)
e Use of at least one bespoke method you defined and wrote yourself
e.g. eyes(), drawX().
f Use of Processing methods
e.g. mousePressed.
g Use of String methods (15)

Complexity of code (10 Marks)

This is a mark out of 10 based on the complexity of the problem solved/code. So you will get more marks if the animation is more involved than one that is very simple. Please do not confuse an elegant solution of a complex problem with a simple problem.

How is the final mark calculated?

The final mark is calculated by multiplying the two component marks and dividing by 10. This means that complexity is a multiplier so a weakness in that will negatively affect your grade.


  • Structure of code = 80/100
  • Complexity of code = 9/10
  • Final mark = (80 by 9)/10 = 72%

Interview (and subsequent grade calculation)

Please note that we reserve the right to interview you on your code via Slack video call. You may be asked (for example) to explain:

  • Any of the code.
  • How you decided on your animation.
  • How you developed your animation; where did you start first, etc?
  • Anything else.

If we need to interview you on your work, you will be given a mark out of 10 for the interview. This mark will be a multiplier of your overall grade. For example:

  • Structure of code = 80/100
  • Complexity of code = 9/10
  • Interview = 8/10
  • Final mark = (80 by 9 by 8)/100 = 57.6%

Handup of submission


The submission is due Sunday, 17 February 2019, 11:59 PM.

No late submissions will be accepted (unless mitigating circumstances, with supporting documentation, apply).


The dropbox is available in the 'Assignments' section in Moodle.

File naming convention

Your files should be contained in a folder named according to the rule:

  • First name + Second name, e.g. Donald Duck's folder would be called DonaldDuck.

You should then compress (zip) the folder that contains all the sketches used to develop your assignment; this is the file that you should submit.

readme tab

You must include a readme tab in the sketch. The contents of this tab should be of the following format:

Name : 
Student Number:

Brief description of the animation achieved:

Known bugs/problems:

Any sources referred to during the development of the assignment (no need to reference lecture/lab materials):


reflection tab

You must carry out your own self assessment on your work and show this by including a reflection tab in the sketch. Use the rubric to reflect on the work you've done and assess yourself accordingly

Detail for each row of the rubric, examples that you used in your code, what they are used for, and line numbers where they can be found.

/* Reflection

Name : 

Student Number:

Part A - Mark (X /5)

Comments, indentation, naming, structure of code, includsion of Readme and Reflection.

<just a mark needed here>

Part B - Mark (X /10)
line XX - draw() 
line XX - setup()

Part C - Mark (X /10)
Use of if statements:

line 10 to validate ...

Part D - Mark (x /20)
Use of loops:

for loops used on:
line 43 to draw 5 squares
line 70 to draw 4 circles 

use of while loop on:
line 20 to ...| 

Part E - Mark (x /20)
Use of at least one bespoke method:

line 97 drawCar()

Part F - Mark (x /20)
Use of Processing methods 

line 113 mousePressed()

Part G - Mark (X /15)
Use of String methods 

line 125 mousePressed()