Hide menu

TDDB84 Design Patterns

Lab assignments

This page is currently reflecting the proposed format for the Fall 2014 edition of the course. The contents of this page is still subject to changes before the start of the course.

These instructions are valid from the fall of 2014

General Instructions

The software you will be working on is FreeCol, an open source implementation of a multiplayer strategic computer game set in the Caribbean during the era of European colonization. You will analyze, test and modify the software, to emulate a normal progression for new developers in a project, and in the process try to understand how the software works, in terms of design decisions and their impact on your ability to understand, test and modify it.


The lab series will be performed within a larger software project due to the nature of software design and design patterns: design patterns will be necessary and visibible only at a larger scale in software projects. Also, software design tends to matter only when several people work jointly on a project, which is why you will be divided into groups.


Based on the pairs registered together in WebReg , you will be assigned (almost) randomly to one of three main topic groups:

  • The GUI group (package net.sf.freecol.client.control,gui)
  • The Domain model group (package net.sf.freecol.common.model)
  • The AI group (package net.sf.freecol.server.ai )

Each pair will belong to one of these three groups, and will also be connected to two other random pairs from each of the other two topic groups. See the table below for more information. Each row lists three groups that are connected to one another through the lab series. Each group will primarily be investigating, testing and adding functionality in a restricted part of the application described by the Java package listed to the right of the name of each group above.

Timetable overview

The lab series is a big part of this course, so prepare to invest some time in it. Below are the expected hours for each laboration given, and these include not just doing the laborations but also discussing with your peer groups, submitting forum posts to Moodle, and reading other groups' material.

  • Lab 1 should take 24 hours to complete.
  • Lab 2 should take 24 hours to complete.
  • Lab 3 should take 32 hours to complete.

This sums up to 80 hours, which is equivalent to the 3hp or 3 ECTS.

Note: This is just an overview for you to get a brief appreciation for the workflow. For a more detailed view, please see Timetable


In order to be able to hand in your assignments for the labs, you will require enrollment keys for Moodle so that you will be added to the correct group in that system. The following keys are set for the groups:

The software will be developed within a lab environment that consists of the programming language Java, a Java development environment (Eclipse), source-code management for distributed development (git/GitLab) and the software itself (FreeCol). In that order, we suggest that you do tutorials to understand the parts that you are not familiar with since before:

In order to get started after have been assigned a group, it is necessary that you complete the following steps: Git & Gitlab guide.

We encourage you to try the game, alone or against your friends.

You will have had projects and accounts generated for you in GitLab, where the first person in each subgroup will be the owner of the project. You will need to ensure that you can collaborate on the project both of you, by making both students developers in the same project. Is is assumed that you work actively both by submitting to the project.

Also, you will have to invite your assistant to be a developer in your projects, so that he or she can review your progress. Your projects will not be visible to all other students. The groups that you are working with will have to submit their work to you as pull requests.


Below are some suggested tools that could provide useful throughout the lab series.

  • ObjectAid UML Explorer - Provides an UML overview over a selected set of classes, which could prove useful when locating design patterns or finding structural dependencies in the code.

Hints and help

  • The Eclipse command to Open Call Hierarchy is a useful tool to help see dependencies and usage for methods and constructors. In order to use this command right click on a method or constructor and select Open Call Hierarchy from the drop down menu.
  • If you are new to Eclipse or just need help on how to setup, compile and run the FreeCol project, please see the compiling and running FreeCol tutorial

Bonus points for written examination

During lab 3 you will have the possibility to acquire bonus points for the written examination. More on this in the instructions for lab 3.


  • Q: What if our group fails to comply with the deadlines for the labs, with respect to participating with others' or producing code of our own?
  • A: You will be tasked with extra assignments (see the end of each lab description under Extra Assignment)

Lab assignments

Page responsible: Ola Leifler
Last updated: 2014-08-15