Java code demoing GOF patterns.