How can i design this particular Situation.
Problem is :
- if i implement Swim in Bird and add diveNow() behaviour to "fly high" but it is not desired since all birds can't fly.
in other words "Some objects can do that and some can't and both belongs to the same class.
Can i use Strategy Pattern. How? What if i have a huge set of behaviors [Interfaces] having same kind of problem.
Aucun commentaire:
Enregistrer un commentaire