The function which changes the state of an object is known as
Answers
Answered by
8
Answer:
New states can be added by defining new state classes. A class can change its behavior at run-time by changing its current state object.
Answered by
1
The impure function is the function that changes the state of an object.
- An object is any variable that is needed for the program.
- Object state denotes the features or values or characteristics of that particular object.
- When using the impure function on the objects it changes the input state and produces output.
- And pure functions do not change the variables or objects.
- Thus for changing the state of the object the impure functions are used.
Similar questions