Yesterday (Sunday Feb 20th) I intended on finishing up the second state diagram for my second assignment. I had the worst headache of my life (honestly) and couldn’t pull myself to do it. After work today I took a stab at it, and the following is what I came up with. I blogged about this before, but I wanted to show the “final” product.
Not too much changed from my first cut. I changed some of the names, filled in most of the triggers, and added some “do” activities. This one was difficult because of that middle part. There are so many triggers to take into account. In almost every state of playback you can jump to paused, rewind, fast forward, and play. This is a “simple” DVD player, I could have also included a menu button, a self transition on “Normal Speed Playback” to jump chapters, and I could have fleshed out the “DVD Menu” to account for special features and such. Things would have been rather hairy if I did. I suppose I could have created sub state diagrams to account for those, but I am not sure what the benefit would be. I just hope the professor is happy with this level of detail.
I have one more of these to go, and that is the state diagram for an answering machine. That one will be fun :). I should have this assignment finished up within the next few days, then I have to take my first exam :P. We’ll see how that goes.
P.S. UML experts out there please correct me on any bad notation!