One of my weekly class assignment was to put into practice a combination of design patterns to eventually form another one called the Transaction pattern. Here are the pattern I had to master to do so:
- Composite : used to treat uniformly a group of objects the same way as a single instance of the same type of object.
- Visitor, iterator : used to define a new operation for (some) classes of an object structure without changing the classes.
- Memento : used for persistence and implementation of the backup.
- Template Method : used to delegate certain methods to the sub-classes.
I recommend to use BlueJ because it is more easy to visualise the pattern "more graphic".
To read the assignement (in french) see: tp_commit.html
===
Exemple des devoirs hebdomadaires pour le cours de design pattern java.
Ce projet est prévu pour BlueJ, un logiciel d'apprentissage Java qui a l'avantage de montrer graphiquement les relations entre les class. Pour notre cours de design pattern c'est plus graphique…
Lire le sujet du tp : tp_commit.html