Lab sessions

Lab sessions

General information

You cannot learn programming simply by reading a book or looking at other people’s code, you have to actually practice it yourself. To give you the necessary experience, the course has a number of lab sessions (listed below). Make sure you have the latest version of the instructions before starting.

The labs are carried out in groups of two people. Note that you must work in groups of two; it is not allowed to work alone unless you have agreement with the coordinator for exceptional cases.

When you are finished with a lab session, you must hand in your solution via the Fire system. You will also get your grades via the same system (see below).

The lab assignments are compulsory and part of the examination. Both members of a group must actively participate in the implementation. Discussion between members of different groups is allowed, but you should write all solutions yourself. Under NO circumstances should you ever look at the code of another group, or show your code to a member of another group. To copy a solution, whole or in part, from anyone else is considered cheating (see the document on Cheating and Academic Honesty).


There are two to three lab sessions each week, please check TimeEdit for the time and location. You can decide which lab session to go to, but note that it is easier to get help in less crowded sessions.

Before going to the session, it is recommended to carefully read through the assignment. Prepare a solution sketch on paper before you start programming: this will save time for both yourself and the lab assistants.

We use a web-based system to keep track of who needs help. If you want help from one of the lab assistants, you should add your name to the list here.

It is likely that you will not finish the assignment during one session. The computer rooms are always at your disposal, except when they are reserved for other courses.

Submitting your solution

Submission of your solution to the lab is done using the Fire system. Each member of the group should register individually on Fire, after which you can create a group in the system.

Please follow these instructions when preparing your solution:

Solutions that fail to follow these instruction will be rejected. Warning: do not forget to click the “Submit” button when you are finished with your submission.

Please check the submission deadlines carefully and submit your solution well in time. Late submissions will not be accepted unless there are exceptional circumstances.


Solutions will generally be corrected within three working days. If you submit (far) before the deadline then it may take longer.

We use the following notation for feedback in Fire:

   -     reason for rejection
   =     error that should also be fixed in resubmission
   #     minor remark, e.g. poor choice of variable name
   +     something the group did well

In case your solution is insufficient, you get one extra chance to submit a corrected version. The corrected version must be submitted no later than two weeks after the initial deadline.

Lab sessions in study period 1

More information will be added here at a later time.

Lab session 1

The purpose of the first lab session is to familiarize yourself with the programming tools used in this course (JDK and IntelliJ), and write some simple Java applications using if and white statements.

Lab session 2

In the second lab session, you will program a simple (virtual) robot to perform various tasks, such as cleaning a corridor, solving a maze, or escaping from a room. The purpose of the second lab session is to practice writing your own methods, using for- and while-loops, to write programs using top-down design, and to think at different abstraction levels.

Lab session 3

In the third lab session, you will program a small library for creating and processing digital audio files. You will need to work with single-dimensional arrays, for loops, and Java’s Math library.

The sound on the lab computers don’t have audio for self-explanatory reasons. To listen to the audio files created by your program, please bring a pair of headphones with a 3.5mm jack (as used on most phones). On the computers in MT0 / MT9, plug in your headphones and follow the instructions here.

Lab session 4

In the fourth lab session, you will program a library for editing digital images in greyscale and color. To do this lab session, you need to know how to work with multi-dimensional arrays.

Lab sessions in study period 2

Lab session 5

In this lab session you will write methods for translating a message to two made-up languages, and you will implement a couple of classes for simulating a number of players rolling dice. The goal of this lab session is to rehearse the programming skills you learned during the previous period and implement your first small classes.

Lab session 6

In this lab session you will implement a three-player dice game known as LCR. The goal of this lab is to learn how to implement a program that consists of many objects of multiple classes that interact with each other.

Lab session 7

In this lab session you will implement a GUI (graphical user interface) for the LCR game you implemented in the previous lab session. The goal of this project is to practice event-driven programming and become familiar with Java’s Swing library.

Lab session 8

In the final lab session, you will implement a Tower Defence game with a (very simple) graphical interface. To finish it, you will need all of the things you learned throughout the course.

UPDATE: Files now also include the icons for monsters and towers.