Mohamed Sanaulla: Factory Method pattern in Java