Assignment Week 1

Here is the solution for the assignment.

The assignment for the first week is

I have uploaded a video that shows you how to start with the development.

This is a very important exercise. In the future, all the functionality that you write in this course should be based on a scenario within a feature file (which you have written yourself).

The technologies used for behaviour-driven development (BDD) and automated testing are Cucumber and JUnit 4 (note that Cucumber is still relying on JUnit 4 instead of Junit 5). It is okay, if you include JUnit 5 in your classpath, but Cucumber maven dependencies will automatically include JUnit 4 too.

Cucumber has been developed to be used together with Ruby and for Web development. Thus it is difficult to find good resources for using Cucumber with Java. There is a nice book called "The Cucumber for Java" book written by Aslak Hellesoy; Matt Wynne; Seb Rose in 2015 which fills this gap. It is available online via the DTU library. I highly recommend reading the book.

Please also have a look at the Java Tips and Tricks, which provide information on the use of Exceptions and the error message "Compiler error: Unreachable catch block" plus how to iterate over lists.


Part of Programming Exercise: A library application
Hubert Baumeister
April 23, 2018