Module description

This site contains the up-to-date course material, exercises and announcements about PRC2 (Programming Concepts 2: the Test Driven Way), starting in February 2019.

Responsible Teachers for 2019: PRC2: Pieter van den Hombergh, Richard van den Ham, and Linda Urselmans.

Study materials

Study the theory and do the tutorials before you come to class. This will make the lessons more effective for you, because the questions that you might have from studying could be answered immediately.
Studying is not glancing over some (web) pages, but experimenting with the compiler, IDE and other tools, to see if you can use the presented ideas and apply it in your own code.

Topics 2019

Week Topic Exercises


Test Driven, Unit Testing basics, using coverage

Two Stacks, Fraction


Testing and using Exceptions

In the pub, Shopping cart


Test Driven, how do you actually do that?

Password validator, Booking system


Enums & Generics

Boxes, Shapes, Drinkers


Lambda Expressions

Comparator, Calculator


Java 8 Streams



Java FX Bindings



Object serialisation using JSON



Advanced Testing testing: Mocks and Parameterised Testing



State machines /Regex/



Java Reflection





You should start with the exercises in the week they are listed in and hand them in by committing your work to your personal subversion repository before the start of next week’s lesson. There will be no new exercises in the final lesson week.

Way of Working during practical hours.

tdd The way of working with the practical assignments is as follows:

  • Each student has a personal subversion repository

  • The teachers will add the starter project for the assignment in due time
    to all student repositories, which are then available for checkout by the students

  • The students will work on the assignment and work TDD style.

    • Write a test for a requirement (typically a method),
      see it showing failure (RED),

    • then implement the method to turn the test GREEN.

    • If GREEN, svn-commit both test-class AND implementing class.

  • If the assignment is complete (all requirements covered with tests, all tests green and code coverage at an appropriate level ) ask any of the teachers or student assistants to run the teachers test on your code.

    • The teachers will not explicitly test your tests, only your implementation code, but will provide you with the test report.

    • They will run your tests, to see if your test report is in agreement with the teachers tests.

This procedure is similar to the one followed during the performance assessment at the end of the semester. The difference is that we will review not only the implementation, but will start with reviewing the tests. If there is no valid test, the implementation of the method will not be considered.

Slack channel(s)

For questions and answers thus documenting them and also discussions and explanations, sharing information, links and other things between students and lecturers, feel free to use the slack channel: Slack invitation link.

Please use the channel #prc2class. We will use this channel to ask and and answer questions during and after class.

Please note that the content of this channel will appear on youtube because we are recording the lectures. So use proper language.

You are only allowed to use a email address. Using slack is optional, but if the students share their knowledge here, this can be a helpful source and learning environment.

Solutions to various exercises.