File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Factory method and Strategy pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Factory method and Strategy pattern" Watch "Factory method and Strategy pattern" New topic
Author

Factory method and Strategy pattern

reham saud
Greenhorn

Joined: Dec 05, 2011
Posts: 7
Hi,
I have question about how to combine the factory method and strategy design patterns together.
this is what I have reach to, but I'm not sure of it.


Thank you,
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10923
    
  12

Generally, it helps if you ask a specific question. All I see here is "I need to do X" and a bunch of code.

Nobody has any idea what SPECIFIC help you need.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
reham saud
Greenhorn

Joined: Dec 05, 2011
Posts: 7
sorry for that, what I need help in that I'm trying to combine the two patterns together. Strategy and factory method. And I'm not quite sure from what I have done. Is the code I posted is correct way to apply strategy and factory method together.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Factory method and Strategy pattern
 
Similar Threads
New sort algorthim
Strange DB behavior w/hibernate
a question about RMI implementation's concept
3DES implementation question
strategy and template pattern