Java Factory Design Pattern

create object without exposing the creation logic to the client and refer to newly created object using a common interface.

interface or abstract class for creating an object

the subclasses decide which class to instantiate