text: class Pasta {
    constructor() {
      this.price = 0;
    }
  
    getPrice() {
      return this.price;
    }
  }
  
  class Penne extends Pasta {
    constructor() {
      super();
      this.price = 8;
    }
  }
  
  class PastaDecorator extends Pasta {
    constructor(pasta) {
      super();
      this.pasta = pasta;
    }
  
    getPrice() {
      return this.pasta.getPrice();
    }
  }
  
  class SauceDecorator extends PastaDecorator {
    getPrice() {
      return super.getPrice() + 5;
    }
  }
  
  class CheeseDecorator extends PastaDecorator {
    getPrice() {
      return super.getPrice() + 3;
    }
  }
  
  export { Penne, SauceDecorator, CheeseDecorator };
  