Defines a family of algo, encapsulates each one, and makes them interchangeable.
program to interface not to implementation.
eg: Duck
Duck -> FlyBehavior & QuackBehavior
+ fly
+ quack
-setBeh()
-setQua()
real world:
Parser -> Lex
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment