title: Decorator pattern example
body: <p>I was going through the Decorator design pattern and saw that every second example uses an <strong><em>Abstract decorator class</em></strong> and also implement the interface of the class for which decorator is to be created. My question is,</p>
  
  <ol>
  <li><p>Is it necessary to have an abstract decorator class and then define the concrete decorators ?</p></li>
  <li><p>I have created a sample which i think can resemble the functionality which is being achieved by the above mentioned Abstract class approach. </p>
  
  <pre><code> public interface ICarModel
   {
     Int32 Price { get; }
     Int32 Tax { get; }
   }
  
   public class BaseModel : ICarModel
   {
     public Int32 Price
     {
       get { return 50000; }
     }
  
     public Int32 Tax
     {
       get { return 5000; }
     }
  
     public String GetBaseCarDetails()
     {
       return "Base car model Price is : " + this.Price
         + " and Tax is : " + this.Tax;
     }
   }
  
   public class LuxuryModel
   {
     ICarModel _iCarModel;
  
     public LuxuryModel(ICarModel iCarModel)
     {
       _iCarModel = iCarModel;
     }
  
     public Int32 Price
     {
       get { return _iCarModel.Price + 10000; }
     }
  
     public Int32 Tax
     {
       get { return _iCarModel.Tax + 3000; }
     }
  
     public String GetLuxuryCarDetails()
     {
       return "Luxury car model Price is : " + this.Price
         + " and Tax is : " + this.Tax;
     }
   }
  </code></pre>
  
  <p>Can we say that this is an example of the decorator pattern ?</p></li>
  </ol>