Module descriptions
* Module description DeVelopment Processes * Module description PRogramming Concepts 2

This site is contains the up to date and combined course material, exercises and announcements about PRC2 (Java Programming 2) and DVP (Development Processes), starting in Februari 2018.

The literature for the courses:

  • For The testing part we use the book Unit Testing with JUnit and Mockito by
    Tomek Kaczanowski.

  • For the PRC2 part we will mainly use the Oracle Java Tutorials on the topic.
    The exercises will be published on this site.

  • For the Development process theory, the literature will be announced here as soon as it has been decided/

Study the theory/ tutorials before you come to class. This will make the lessons most effective, because the questions that you might have from studying could be answered immediately.

Studying is not glancing over some (web) pages, but experiment with the compiler, IDE and other tools, to see if you can use the presented ideas and apply it in your own code.

In the schedule the DVP block is planned before the PRC2 block, thereby promoting the idea of Test Driven Development: You write your test, derived from the requirements and then write your code. To do this properly, you MUST study the PRC2 theory and tasks before you come to the DVP lab sessions.

Topics 2018

Week PRC2 Theory PRC2 Practical DVP1 Theory DVP1 Practical


Collection Framework, Comparator

Quiz Inheritance/Polymorphism, Implementation of Stack & Comparator

Unit Testing Introduction, Build Processes and Tools, Subversion (Colloquium)

Test Stack & Comparator, Test Fraction


Exceptions & Logging

Beer Assignment

Coverage & Tooling, Test of Exceptions

Test Beer Assignment + Coverage


Enums & Generics

Planets for Enums, Shape for Generics

Basics of Project Management

Refactoring Stack, Test Enums, Test Shape


Lambda Expressions/Filter, Comparator as Function

Olifantys, Refactor Comparator from wk01

Assertion Libraries, PM: Project Management in IT

Test Olifantys


Streams, File IO, Try with Resources

CSV2Objects, LambdaLibrary

Maven / Build Tooling, Dependencies on Versions PM: Integration Management

Test CSV2Objects, LambdaLibrary


Threads & Sockets, Serialisation

Wordtransl. SimpleRestful

Mocking, Spy, Stubs

Test Sockets with Mocks (Mockito), Test Serialisation



Simple Rest API Refactoring, Replace Map by DBTable

PM: Scope/Time/Cost Management



REST-API (e.g. Jersey)

Testing Theory, Finding Testdatai, PM: Scope/Time/Cost Management, Agile Principles and Mindset

Integration Tests, Rest Easy


State Machine, Regex

Gumballs, Templating

PM: Agile Stakeholder Engagement

Test Gumballs, Test Templating


Java FX Bindings



Test Bindings (Clock)


Java FX GUI, Architecture (Thin GUI)


Mutation Tests (PIT), PM: Agile Value Driven Delivery



Reflection (Agents, Lombok)

Class Hierarchie

PM: Agile Adaptive Planning



Rollup and relax

You should start with the exercises in the week they are mentioned and hand them in through your personal subversion repository before the lessons in the next week start. There will be no new exercises in the last week.

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. 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.

1. Week1 Polymorphism, interfaces, Comparator and friends, Test Driven Development.

Week 1 rehearses some PRC1 stuff and introduces (unit) testing, the Java collection framework, and the Comparator as a way to make the collection very flexible.

Oracle tutorial on Interfaces and Inheritance and Collections.

Study tutorials before you come to class or practicum.

Sheets sets:

Responsible Teachers: PRC2: HOM, HVD; DVP: HOM, SBK.

1.1. Additional pointers

Start reading the fine manual (RTFM),in this case the api doc:

1.2. Demos

Lecture demo PRC2 about comparable, project in a zip. Complete the project according the tests.

1.3. Exercises

2. Week2 Exceptions and Logging


2.1. Additional pointers

2.2. Demos

Lecture demo PRC2 about comparable, project in a zip. Complete the project according the tests.

2.3. Exercises

2.4. Maven settings and repository

A maven repository is a server that provides ready built maven 'artifacts', such as (binary) jar files containing libraries, frameworks or APIs and in many (but not all) companion jar files containing the javadoc (often) and sources of the same binary. A maven repository is NOT a source code management system (CMS), although it typically holds several versions of a binary.

The is a default repository, called maven central. You (as team, comapny) can have your own repository. We at sebi Venlo did that too. Our repository lives at Note that only teachers can put (jar) files in that repository. If you look at that repository you will see that it is organized along the three coordinate axis: groupId, artifactId and version.

To make this repository available for your own projects, add the following to your `~/.m2/settings.xml in the profiles section. You may also want to make that profile active.

adding fontysvenlo repo to your maven settings.
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns=""

Note that I am using an installed maven (3.5.2) which you can download from apache maven, not the one bundled with netbeans. You can tell netbeans (via tools→ options →java→maven) to use the installed one instead of the bundled on.

Doing this gives you the access to sebipom, which defines a parent pom for projects. This again provides some goodies that you otherwise have to provide yourselves. Such a parent pom is similar to a super class in Java; your pom inherits all the traits of the parent.

Including that parent is simple. See below for the sebipom (version 1.2).

sebipom as parent.

Some of the starter projects we provide already use this parent. To get that working, apply the settings above.

3. Week3 Enums & Generics - Project Management Basics

Constants with functionality and more on type safe storage.

Study the oracle tutorial on Enum and Generics:

Sheets sets:

3.1. Week 03 Exercises.

3.2. DVP Theory - Project Management Basics

Today starts an introduction to the basics of project management.

Since a lot of work nowadays will be done in projects, it is important to understand what a project is, what not, what project management is about, which frameworks, tools and techniques are there and how to use them.


You can always ask question in slack in channel #dvp1 on Of course it is a good idea to not only ask questions, but also try to share your knowledge and answer the questions of other students.

3.2.1. Slides - Project Management introduction

4. Java: Lambda & Streams. DVP: Assertion Libraries, Refactoring and Project Management in IT.

Java gets more functional since Java 8.

Study the oracle tutorial on Lambda and Streams:

Sheets sets:

There is also a summary on lambda under lambdaandfunctions.html

4.1. DVP Theory - Refactoring

Refactoring is an important task of software developers.

4.1.1. Slides week 3 - Refactoring

4.2. Study the DVP test book.

In case you are missing directions for what to study of the test book (Unit Testing with JUnit and Mockito by Tomek Kaczanowski.): All of it, but not necessarily at once. We will apply several techniques from the book during the course, mainly in the lab exercises. Of course you may ask during class if there is a topic you do not understand (yet).

We did not add specific topics or order of topics in the study guide on purpose. For instance the way you can parameterize your test is shown in the book in several ways (e.g. in Chap 3). We have shown that in for instance the fraction solution, where we have demoed during class on Thursday 2018-02-22. We expect you to understand the concepts and be able to use an API (LG5, PRC2), even is it is a testing API.

4.3. Week 04 Exercises.

4.4. DVP Theory - Project Management in IT

Topics of today is Project Management in IT. Mainly it is about understanding how organizations are structured, about life cycles of projects and products and what project phases are.


You can always ask questions in slack in channel #dvp1 on Of course it is a good idea to not only ask questions, but also try to share your knowledge and answer the questions of other students.

4.4.1. Slides Project Management in IT

5. Java: Streams,Serialization and File IO, DVP: Time Management.

5.1. Java 8 Streams.

Study the oracle tutorial on Streams:

Consider a conveyor belt

filtering converyor belt

Read the summary on lambda and streams under lambdastreams.html.

5.2. File IO.

Interaction with the file system, writing object to streams and files.

Sheets sets:

5.4. Week 5 - DVP Theory - Testing

This week, there will be no DVP slide set, but instead, class will be about demonstrating how to use parameterized tests and how you could have solved some homework tasks.

To study Testing: Assertion frameworks. Study the book Practical Unit Testing with Mockito, chapter about assertion frameworks.

AssertJ is the successor of FEST, and has an active developer community.

In particular Hamcrest and AssertJ are of interest here.

5.5. Week 05 Exercises.

5.6. DVP Theory - Project Management - Integration Management

Topic of today is Project Management the knowledge area of Integration Management.


You can always ask questions in slack in channel #dvp1 on Of course it is a good idea to not only ask questions, but also try to share your knowledge and answer the questions of other students.

5.6.1. Slides - Project Management - Integration Management

Read the additional material on the website linked below and also watch the provided video for a short recap.

Integration Management in 2 Minutes

6. Threads and sockets.

Program a simple client server file transfer.

For this week study Oracle Networking Tutorial, in particular the part "All About sockets".

Sheets and handhout

Sheets on sockets and threads sheets and handout

6.1. Week 06 Exercises.

7. Java Database Connectivity (JDBC)

How to work with a database directly from Java in a command line, desktop or web application.

Study the JDBC Introduction.

7.1. Week 07 Exercises.

7.2. DVP Theory - Project Management

Topic of today is Project Management the knowledge area of Scope, Time and Cost Management.


You can always ask questions in slack in channel #dvp1 on Of course it is a good idea to not only ask questions, but also try to share your knowledge and answer the questions of other students.

7.2.1. Slides Project Management - Scope/Time/Cost Management

Download the PERT example sheet below and also watch the provided video about scope creep.

Scope Creep - The Wasa

7.2.3. DVP Processes Homework

Do an estimation for the following activities (you can also take your PRJ2 tasks):

  • Analysis

    • Use Case diagram

    • Use Case description – Create Order

    • Use Case description – Add Customer

    • Use Case description – Create Invoice

    • Activity diagram – Order process

    • State machine – Order

7.2.4. Your task

  • Create e.g. an excel, list, table of your choice.

  • Use a 95.45% confidence (sigma)

  • List up the estimations with delta (+- standard deviation)

  • Post to #dvp slack channel

For a helpful tool see: PERT Estimation - example Excel Sheet

8. RESTful Java with JAX-RS

Makes development of RESTful web services in Java simple.

8.1. Sheets and handhout PRC

Sheets on Restful services with JAX-RS sheets and handout

8.2. Sheets and handhout Testing

Sheets on testing and mocking restful services . By Loek Ehren and Rick van Osch.

A Guide to REST-assured on the baeldung site. Get acquainted with the concept. We will NOT use groovy etc. For that we have the workshop.

Intro to wire mock on the baeldung website.

The wiremock website will have more info on rest mocking.

For manual rest api testing the Advanced Rest Client could be used. It is based on nodjs, electron and chromium, the same technology stack as Atom, vs-code and more.

An alternative and nice and good looking rest inspection client Insomnia , suggested by Jordi Limpens.

logo Payara5, the preferred JEE constainer for PRC and Project 2. Payara are related to Piranha, also a well known bad-ass fish.

Payara the bad ass fish

8.5. Rest Assured, how to post a student

Short intro into rest assured on how it is used in the lesson demo with the olifantys grading system.

8.6. Week 08 Exercises.

8.7. DVP Theory Project Management and Agile Processes

8.7.1. Slides Scope Time and Cost Management

8.7.2. Slides Agile Principles and Mindset

8.7.3. DVP Theory - Agile Principles and Mindset

See also the funny video about Scrum:

Scope Creep - The Wasa

9. State machines and regular expressions

The PRC and DVP/Testing topics area

  • State machine

  • Regular Expressions

  • Mocking with Mockito

in no fixed order. State machines have been introduced in AAD1.

9.1. Extra bulletin on design and implementations

9.2. The testing topic first: Mockito

Demo in class. The OlifantysBalls exercise is a heavy user of mockito. See the exercises. You can read up in the book and look at the mockito javadoc/tutorial, which is available during the assessment as well. Make sure that you know where to find things.

Short slide set on mockito and dependency injection with annotations.

9.3. Regular expressions.

All modern languages support regular expressions. The perl flavor is the most common one, including in Java. Luckily that there is somewhat of a standard here.

We have few slides: regex slides and regex handout.

To study go to to the orcale turorial on regexes and also study the java.util.regex package, which has only one interface, two classes and one exception, so it should be doable. Note that we linked to the Java 9 version, which is searchable.

9.4. State Machines

We will explain in class that regular expressions also heavily rely on state machines. Luckily the regelar expression take the hard work of creating the state machine from you.

We will start the DVP class with state machines, and what is left over will be spent on Agile Processes.

State machines or charts can be implemented in several ways. We will use a modern OO approach using the well known State Pattern , enum and some Java 8 features, in particular default methods.

State Pattern and is nephew Strategy both have the same basic shape, UML wise:

Figure 1. State Pattern

We deal with a context, an abstract state and concrete state instances that do the work and represent the state elements in the diagram. In the diagram above there would be a state instance for both ConcreteStateA and ConcreteStateB. In the our implementation we will be using enum as the basic construct for our work.

As an example: the gumball machine, whose state machine diagram looks like

State machine

and its class diagram like

State machine class diagram

A comlete narative on how to develop a statemachine test driven is available at having a ball with TDD. To get started, refreshen you knowledge by studying the book on Mockito, because that is what we are going to use here.

9.5. Week 09 Exercises.

9.6. DVP Theory Project Management and Agile Processes

9.6.1. Slides Stakeholder Engagement

10. JavaFX Bindings

10.1. Theory and slides on JavaFX Bindings.

There is a good tutorial about javafx bindings on the oracle website.

The slide set gives a summary of that.

10.2. Demos

  • Observable List View using the Stack Overflow Rest API.

Code comes from and is described in the book Pro JavaFX 8

Not that the example uses a very simple an basic way to communicate with the API, using the standard Java SE API to open a connection to a host and retreive the payload. The example knows that the info is in json format and does not bother to specify the mediatype in the request.

10.3. resources

The framework to show the agenda in class is from You can add jfextras as a dependency to your maven JavaFx project by adding the dependency below. It has many nice widgets, in which you can apply binding to your hearts content.

jfextras dependency

10.4. Java FX GUI, Architecture (Thin GUI)

The demo on the Agenda has a few flaws,

  • both business wise as well as

  • architecture wise.

Can you point them out? (Answer: it is in the architecture. Doing too much in the GUI layer makes it a badly testable design.)
The solution is to use the UI layer to improve the user experience (UX), but to keep the (final) decision in the business layer where the decision taken by said business layer can be tested. In the example, let the use move then appointments on the GUI only, but require submit or something the trigger the business acceptance method. This in the end could be as simple committing the appointments to the database, and with properly designed constraints in the database, that will in the end accept or reject the combination of appointments.

10.5. Week 10 Exercises.

11. Reflection, the multi cutting edge

Study the reflection tutorial.

Optionally look at annotation tutorial.

11.1. Week 11 Exercises.

11.2. DVP Theory - Project Management and Agile Processes


You can always ask questions in slack in channel #dvp1 on Of course it is a good idea to not only ask questions, but also try to share your knowledge and answer the questions of other students.

11.2.1. Slides - Value Driven Delivery

Topic is value driven delivery, which mainly means, delivery the things first which have the highest business value to the customer.

11.2.2. Slides

12. Numbers & Computation


12.1. Week 12 Exercises.


12.2. DVP Theory - Project Management and Agile Processes

12.2.1. Slides - Agile Adaptive Planning

Topic is value driven delivery, which mainly means, delivery the things first which have the highest business value to the customer.

12.2.2. Slides

13. Week intentionally left vacant.

You will have sufficient work and questions to fill up the whole week ;-)

Solutions to various exercises.

Project Management and Agile Processes Overview

Goto PM and Agile Overview Page for a complete overview about the PM and Agile topiccs only (for learning purposes)