A coffee shop application initially had a simple Beverage cl…

Questions

A cоffee shоp аpplicаtiоn initiаlly had a simple Beverage class with a cost() method. As the business grew, they needed to handle various condiments (milk, mocha, whip) that customers could add to any beverage. Instead of creating a subclass for every possible combination (MochaMilkWhipEspresso, MochaDarkRoast, etc.), they used the Decorator Pattern. What are the PRIMARY benefits this pattern provides in this scenario?