1) What have we done?
We just created "Facade" object and we use in this class intefaces of all 3 classes
public class Facade
public String getDesirableObject()
ClassA a = new ClassA("something");
ClassB b = new ClassB();
ClassC c = new ClassC();
2) What have we achieved?
We just noticeable simplify interface for the client.
Now client doesn't have to know details of which class are used(ClassA, ClassB, ClassC) and relations between them.
public class Client
public static void main(String args)
Facade facade = new Facade();
String desirableObject = facade.getDesirableObject();