Further explaining the pattern

This commit is contained in:
Jasmine Hegman
2015-07-23 16:31:44 -07:00
parent 5e68293513
commit 3ea4bf7603

View File

@@ -4,7 +4,7 @@
Purpose
-------
Demonstrate the Delegator pattern.
Demonstrate the Delegator pattern, where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object. In this case TeamLead professes to writeCode and Usage uses this, while TeamLead delegates writeCode to JuniorDeveloper's writeBadCode function. This inverts the responsibility so that Usage is unknowingly executing writeBadCode.
Examples
--------