Code Refactoring 17

Visitor Design PatternIn this part of the code refactoring tutorial I will answer another challenge I recently received. This tutorial is all about the Visitor Design Pattern.

You use the visitor design pattern when you want to perform a similar calculation on many different objects. It seems to confuse people, but I hope to solve that here. If you understand the concept of method overloading and the passing of objects back and forth for data access I don’t think you’ll have a problem. The code that follows should answer any questions you have.

If you like videos like this, it helps to tell Google+ [googleplusone]

Code From the Video

SalesTrainee.java

Salesman.java

Boss.java

Visitable.java

Visitor.java

YearlyBonusVisitor.java

QuarterlyBonusVisitor.java

TestBonusCalculator.java

4 thoughts on “Code Refactoring 17”

Leave a Reply

Your email address will not be published. Required fields are marked *