State Diagram Example


The diagram that follows models the online credit card payment. Purchasing consists of selecting an item and getting the credit card number, then submitting the information for validation.
Purchasing can be factored into four states: selecting an item, getting the credit card number, validating and rejecting.