Strategies

Recall that using polymorphism allowed us to move away from a control-driven solution toward a data-driven solution for computing pay:

Polymorphism in ABC

However, this solution suffers from the defect that a member can change from hourly to salaried or commissioned.

Redesign the Member class so that it uses the Strategy Pattern to calculate pay.

Test your solution by creating a class called TestOrganization with a main method that creates an organization, populates it with members using varying strategies for calculating pay, then calls the organizations calcPayroll method.