Strategy Pattern and Delegation
Learn how delegation helps avoid strong coupling.
We'll cover the following...
Before moving on to discuss delegation, let’s understand the motivation behind it. Generally, after learning about inheritance, programmers make the mistake of using it very frequently.
Although inheritance is a very powerful concept, it increases the coupling between the base class and the derived class. For example, let’s say we have a base class named Sphere
...