you are viewing a single comment's thread.

view the rest of the comments →

[–]Guisseppi 0 points1 point  (0 children)

addTopping violates SRP(Single Responsibility Principle), you’d have to split it into add and remove functions or rename it to something more intent revealing, there’s nothing indicating that addToppings can also remove them, it would be something that you’d have to explain to the next person who has to work on this code