H1 (retake): UML Modeling

Due Thursday, Sept 19th, 12noon

A deterministic finite state automaton (FSA) is a diagram with states as nodes and transitions as arrows.  The initial state is indicated by an arrow that has no starting node.  An accept(ing) state indicates the FSA has successfully accepted its input, typically represented by a double circle.  The FSA below determines if its binary input has an even number of zeros.  (That is, if the input terminates in an accepting state):

Each node is uniquely labeled with the name of its state (S1, S2).  Each transition from a node is labeled with a unique name (in the diagram above, 0 or 1, but more generally it could be any label, such as a letter ("A", "B") or string ("open", "close", "read")).  There can be multiple arrows between the same starting and ending nodes, but these arrows must have unique labels.

Another example is the FSA that accepts names of Java identifiers:

A name begins with "A-Za-z_$" followed by zero or more characters from "A-Za-z_$0-9", otherwise the sequence is not a Java identifier.  Note in the above diagram, the transition "else" (which is a unique name) designates a transition when all other transitions fail.

Note: how transition labels are to be interpreted is not your problem or part of this assignment.  All you care about is that transitions have labels, period.

Your assignment is to: