Strategy: When the Rule Needs a Class of Its Own

Pass 1 handed the weekly deal in as one function; a carrier's rate needs its own numbers and answers more than one question, so the function grows into a class per carrier, each holding its numbers and keeping one promise, and the quote screen asks whichever carrier it's handed: the Strategy pattern in its classic form.

By

Updated

Cheat sheet: Strategy: When the Rule Needs a Class of Its Own
Category
Data Structures
Level
Journeyman
Tags
Code Smell, Interface, OOP, Strategy Pattern