Computer Science, asked by Omsak8858, 1 year ago

Difference between strategy and state design pattern

Answers

Answered by anmoldeep268gmailcom
0
The difference simply lies in that they solve different problems: The State pattern deals with what (state or type) an object is (in) -- it encapsulates state-dependent behavior, whereas. the Strategy pattern deals with how an object performs a certain task -- it encapsulates an algorithm.

I HOPE IT WILL HELP YOU
Similar questions