What is the corresponding representation of state machine diagram in coding phase(written in programming language)?

StackOverflow https://stackoverflow.com/questions/17948983

문제

State machine diagram represents the life-cycle of object so, What is the corresponding of it(state machine as local view of object) in programming level?

올바른 솔루션이 없습니다

다른 팁

There is no direct correspondence between a state machine and code, you could use any programming algorithm to implement it. For example, you could use an enumeration type with an enumeration literal for each possible state and use it in your implementation class to represent to current state of your instance.

But you could also use other values like "if the user has an empty command list he is in the prospect state".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top