This site is from a past semester! The current version will be here when the new semester starts.

Week 8 [Fri, Mar 3rd] - Tutorial

[Image source: this article]

Hand-drawing diagrams on a white-board and on paper is an important practical skill (e.g., for technical interviews, project discussions). It's possible that the diagrams you draw in your first few attempts to look amateurish, messy, and hard to read, and the drawing itself will take a long time. With more practice, you will be able to draw such diagrams quicker (e.g., draw as you explain verbally your design), with less need for corrections, and the diagrams will look more professional too.

That is why we have structured these tutorials to get everyone to practice this skill so that your first few (not-so-good) diagram drawing experiences happen in the tutorial, not in an interview or during your internship.

Note the following:

  • Draw on paper or on a whiteboard or use a free-hand drawing software (e.g., Bamboo paper). If latter, do not use UML software or predefined shapes.
  • For the same reason, don't use rulers.
  • When the tutor asks you to, take a screenshot or a photo of the drawing and post in the tutorial workspace document.
  • There are mobile apps (example) that can take a photo of a document and and convert it to a high-quality scan.

[Recommended] Do the following before attempting the tutorial tasks

  1. Do this week's Canvas quiz Part I, to self-test your memory of the required UML notation.
  2. Watch at least some of the UML drawing step-by-step example videos provided.

1 Exercise: draw a class diagram and an object diagram

Question adapted from past exam paper.

  1. before the tutorial Do the following exercise, by hand-drawing the answer.
    Use the following layout:

Draw a Class Diagram for the code (StockItem, Inventory, Review, etc.)


  1. during the tutorial
    • Paste the diagram (take a photo if you drew on paper) in the tutorial workspace document.
    • Discuss answers as guided by the tutor.

2 Exercise: draw a sequence diagram

  1. before the tutorial

(a) Do the following exercise similar to the previous one.

Draw a Sequence Diagram for the code (PersonList, Person, Tag)


(b) How would you update the diagram if the PersonList class was updated as follows?

class PersonList{
    void addPerson(Person p){
        add(p);
    }

    void add(Person p){
        //...
    }
}
  1. during the tutorial:
  • As before, paste the diagram in the tutorial workspace document, and take part in the follow up discussion, as guided by the tutor.