Abstract Factory Pattern using Java.