This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am getting ready to start my Developer exam here in a few weeks, but first I wanted to read a couple books. The first, Effective Java, and the second Head Fist Design patterns (I already read SCJD Exam with J2SE5). I am trying to apply some principles that I found in Effective Java - namely static factory methods, immutable classes, and forwarding methods. I am studying the Strategy Pattern, and applying the above Effective Java principles to it. I was hoping someone might want to take a look at the simple bit of code I pasted, to tell me what they think the people grading the exam might think. I don't know if I just made the Strategy pattern unnecessarily complicated, or if I actually accomplished something worthwhile by removing inheritance from the pattern (as is a strong suggestion found in Effective Java). Don't get me wrong...I'm not trying to reinvent the wheel. I just want to better understand and apply these things (without creating problems for myself) before I get my exam.
Thanks to everyone here and congrats to all the people who have passed.
The only thing I can say: don't just use design patterns for the sake of using design patterns in the OCMJD. It is not the purpose to add all 25 design patterns you know (or you have learnt) in this assignment. Just use the one which have an added value and leave the others out. I used (as far as I can remember): singleton, dao factory, mvc and value (transfer) object. Other people also use the facade design pattern, but I don't believe I have heard mentioning the strategy design pattern.
Because you just want something to know about your view/implementation on the Strategy design pattern, I'm moving this thread to a more appropriate forum.