Can an object oriented program be seen as a Finite State Machine?
- by Peretz
This might be a philosophical/fundamental question, but I just want to clarify it.
In my understanding a Finite State Machine is a way of modeling a system in which the system's output will not only depend on the current inputs, but also the current state of the system. Additionally, as the name suggests it, a finite state machine can be segmented in a finite N number of states with its respective state and behavior.
If this is correct, shouldn't every single object with data and function members be a state in our object oriented model, making any object oriented design a finite state machine?
If that is not the interpretation of a FSM in object design, what exactly people mean when they implement a FSM in software? am I missing something?
Thanks