lundi 10 décembre 2018

Why is this a Chain of Responsibility or a Decorator pattern?

A company has 3 kinds of employees: Manager, Software Designer, andHardware Engineer. Each employee category has a different PTO (PaidTime Off) scheme. For example, the Software Engineer is part of a Bonus-Holiday scheme wherein his/her PTOs depend on the successfulprojects completed in a month. The CEO of the company wants to findout how many combined PTOs are left at the end of the year, so they can be donated to sick employees in need. Design a software module to calculate this value. The answer to this question is Chain of Responsibility or Decorator pattern. Can anyone explain this?

Aucun commentaire:

Enregistrer un commentaire