0 votes
in Design Patterns by

Q. What is State pattern?

1 Answer

0 votes
by

Ans:- In State pattern a class behavior changes based on its state. This type of design pattern comes under behavior pattern. In State pattern, we create objects which represent various states and a context object whose behavior varies as its state object changes.

image

Related questions

0 votes
asked Jul 24, 2023 in Design Patterns by SakshiSharma
0 votes
asked Jul 24, 2023 in Design Patterns by SakshiSharma
...