Design Pattern: Facade Pattern

Facade pattern adds a new layer to the system, on top of the underlying complex subsystems. This new layer works as an entry point for the client. The client can interact with this new layer, instead of communicating with the subsystems directly. That way the client does not need to be aware of the subsystems and gets a common interface.

Design Pattern: Strategy Pattern in Java

Strategy Pattern

Strategy pattern is used when there are multiple algorithms available for the same purpose, and we need to decide between those algorithms. Strategy pattern helps to decide the algorithm and return the generated object to be used. This article demonstrates Strategy pattern implementations in Java. Check the following examples.