I can solve the problem of adding functionality by adding sub classing then why should I use decorator pattern what\'s the real advantage of decorator pattern ?
Flexibility, that's the reason IMO.