Program application written in Java utilizing abstract factory and singleton pattern