Can an object oriented program be seen as a Finite State Machine?
Posted
by
Peretz
on Programmers
See other posts from Programmers
or by Peretz
Published on 2011-07-22T02:47:29Z
Indexed on
2014/06/03
21:39 UTC
Read the original article
Hit count: 295
object-oriented
|finite-state-machine
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
© Programmers or respective owner