0
5.8kviews
Draw state machine diagram for a Printer

Mumbai University > Computer Engineering > Sem 5 > SOOAD

Marks: 10M

Year: Dec 2014

1 Answer
0
138views

Printer

  • Printer has two states .
  • printer is either in OFF state or in ON state
  • If printer is in OFF state .we get printer from OFF state to ON state by PressON button or OnButtonPuch()
  • OnButtonPuch() is trigger name ot transition name

enter image description here

The above diagram shows that:

  • Printer has two states ON and OFF states.
  • lets consider orignal state is OFF state and destinaton state is ON state.
  • so, initially printer is OFF.
  • ONButtonPush it change the state from OFF to ON
  • ONButtonPush is transition ot trigger for changing state.
Please log in to add an answer.