What is state pattern used for?

The state pattern is used in computer programming to encapsulate varying behavior for the same object, based on its internal state . This can be a cleaner way for an object to change its behavior at runtime without resorting to conditional statements and thus improve maintainability.

Sizin İçin Seçtik  What are the elements of design pattern?

Leave a Reply

Your email address will not be published. Required fields are marked *