Design pattern illustrated with simple codes.