d | f | e  Login | Print | Search
Home Eric Dubuis
Eric Dubuis >  Past >  Spring 2010 >  UML and Design Patterns

UML and Design Patterns

Spring Term 2010

This course is part of the module, Software Engineering and Design, which consists of the two courses:

  • UML and Design Patterns (4 ECTS / 64 lectures)
  • Object-Oriented Analysis and Design (4 ECTS / 64 lectures)

During spring term 2010, this course is taught by me, and you are reading the home page of this course.

In the other course, "Object-Oriented Analysis and Design", the main focus is on the software development process. That part is taught by my colleague, Prof. Dr. Olivier Biberstein.


This course of the module contains two main lerning targets:

  • UML, and
  • design patterns

UML is a set of graphical notations for the modeling, desing and description of software systems. Design patterns are one aspect (among many others) that help to make good object-oriented designs for software.

The content and exact progress of this part is aligned with the development of a simple graphical editor. Modeling issues, and hence, the corresponding UML language constructs, are tackled along the related design and programming issues. Design patterns are introduced when needed. At the end, students will have a depth understanding of the following UML diagrams: class, object, sequence, and package. Other UML diagram types are also addressed, but with much lesser relevance. Some UML diagram types are not treated in this part of the module, e.g., use case diagrams.

Entering design and programming, design issues are addressed. Some of the most important design principles are taught. Some of the issues are tackled by introducing related design patterns. As progress goes on, more and more patterns will be used.

Testing is another issue: From the beginning, non-GUI related behaviour will be tested. JUnit will be used as the testing framework.

Source code is provided as a ZIP file containing a ready-to-be-used Eclipse projects. For non Eclipse user: An Ant file comes along with the project.


Note: I use Java 6 in all course material examples, exercises, and source code I provide. Apple users, be aware of this fact. Try to upgrade your Java version


The course content will be along the following items:

  • introduction, modeling, UML class diagrams, UML object diagrams
  • class hierarchy, inheritance, polymorphism
  • IS-A relation, IS-LIKE-A relation, Liskov substitution principle
  • further design principles such as the command-query separation principle
  • containment, USES relation, composite pattern, UML sequence diagrams
  • behavioural patterns: iterator, command, strategy
  • creational patterns: factory method, abstract factory
  • structural patterns: composite
  • software frameworks, packaging, dependency inversion

Unit testing with JUnit will be done along the programming parts of the material listed above.

Week/KWPlanned Topics

Initiates file downloadCourse organisation

Initiates file downloadUML class diagrams: classes, attributes, associations, mulitplicities, properties

Exercise: Initiates file downloadClass modeling


UML class diagrams: Programming interpretation, bidirectional associations, operations

Special exercise: Setting up your environment (ZIP archive for testing you set up)

Exercise: On implementing UML class properties

Note/exercise: On programming interpretations of attributes


Initiates file downloadUML object diagrams; JUnit (original by A. Williams, Univ. of Ottawa, Canada; used with permission)

Exercise: Testing with JUnit, Test-Driven Development

Exercise: Initiates file downloadOn Implementing UML Associations


Topics: Initiates file downloadUML sequence diagrams; Initiates file downloadLiskov substitution principle (LSP)

Example code: Initiates file downloadLSP demonstrated

Exercise: Constructing an UML Sequence Diagram


Initiates file downloadAdvanced class modeling concepts

Feedback no. 1

-/13Easter Break

Advanced class modeling concepts

Exercise: Terms


Advanced class modeling concepts

Exercise: Terms (continuation)

Design patterns: Initiates file downloadIterator

Exercise: Tree iterator

Self-study: Opens external link in new windowAdapter

Initiates file downloadNote on Adapter


Design patterns: Initiates file downloadFactory method

Side Track: Initiates file downloadSoftware Frameworks

Exercise: Initiates file downloadThe JDT framework / Factory

Opens internal link in current windowFurther notes on JDT exercises


Design patterns: Initiates file downloadObserver, Java Listeners

Exercise: JDT / Listeners


Design patterns: Initiates file downloadStrategy

Exercise: JDT / Handles



Design patterns: Initiates file downloadTemplate Method, Initiates file downloadCommand

Exercise: JDT / Initiates file downloadSelection Tool, Commands

Opens external link in new windowDecorator

Initiates file downloadNote on Decorator


Design pattern: Initiates file downloadAbstract Factory

Exercise: JDT / Factory for commands


Feedback no. 2
Design pattern: Initiates file downloadComposite

Exercise: JDT / Groups of shapes

Opens external link in new windowProxy

Initiates file downloadNote on Proxy


Initiates file downloadUML packages; Initiates file downloadPackage metrics

Exercise: Package design (Initiates file downloadJava skeletons)


Simulation of final exam (Initiates file downloadsample); design principles revisited (Initiates file downloadlist); patterns revisited (Vince Huston's list)

Exercise: JDT / finalization

Course summary

Evaluation and Grading

There are no exams during the term for this course. Occasional quizzes and/or tests, typically at the beginning of a lecture, provide feedback to the students.

The topics of this course will be subject of the final exam of the module, and will account for 50% of the grading for the module. See Opens internal link in current windowExam Topics for a list of possible topics.


The following pointers may be helpful:


Eric Dubuis

Bern University of Applied Sciences
Engineering and Information Science
P.O. Box
CH-2501 Biel


Office N.472
"Rolex" building
Höheweg 80
2501 Biel
Opens external link in new window[Map]
Opens internal link in current window[Directions]


+41 32 321 6318


Opens window for sending email[Email]



Opens external link in new window[Computer Science Division]

Opens external link in new window[Research Institute RISIS]

Opens external link in new window[E-Voting Group]

Opens external link in new window[E-Voting CC]

Opens external link in new window[LinkedIn]

Opens external link in new window[XING]