Exercice 1

Exercice 1 is here to show you the use of a test suite in development. We ask you to write a simple method to compute the two largest elements in an array, and we provide you with JUnit tests for this method. At the beginning, the method is not written, and all the tests will fail. So your task is to write the method, and check it passes the tests.

Exercice 2

Simple exercice about the composite design pattern. We propose a composite for representing an HTML document. The method toHtml is not written, and we ask you :

Exercice 3

Implement the visitor design pattern on the example of exercice 2.