«^»
11. The use of MVC and the Observer pattern

Whilst introducing the Collections API, the course explains and demonstrates the advantages of using the Model-View-Controller pattern to decouple a data structure from any user interface. The simpler form in which the view and the controller are combined (sometimes called Model-UserInterface) is also discussed. By having the class that implements the model derived from java.util.Observable, it is easy to provide multiple views of the model (the class for each view implementing the java.util.Observer interface). These ideas are illustrated by two examples.

The course develops a case study for which different user interfaces are developed and, also, different data structures are used. Both the user interface and the data structure are easily switched because of the use of interfaces and MVC.