Example of pattern state and observer for teaching.
The source code contains an example in which there is a simulation of Matchs between Teams. The aim of this exercise is:
-
To apply the State pattern to organize bette the source code in the different states of the Match: running, pending, ...
-
To apply the observer pattern for maintaining updates two objects: a) A classification table; and b) a last results' table.