Sams Teach Yourself C++ in 21 Days

(singke) #1
As you can see, in a more complicated diagram, the Canceledstate quickly becomes a
distraction. This is particularly annoying because canceling is an exceptional condition
that should not be given prominence in the diagram. You can simplify this diagram by
using a super state, as shown in Figure 11.25.

366 Day 11


FIGURE11.25
Super state.

Not Logged In

Logged In

Start

Getting Password

Canceled Getting Account Info

Cancelable

The diagram in Figure 11.25 provides the same information in Figure 11.24 but is much
cleaner and easier to read. From the time you start logging in until the system finalizes
your login, you can cancel the process. If you do cancel, you return to the state “not
logged in.”

Steps 4–6: Implementation, Testing, and Rollout?..............................................


The remaining three stages of the processes are important, but not covered here. In
regard to implementation, if you are using C++, the rest of this book covers the details.
Testing and rollout are each their own complex discipline with their own demands; how-
ever, detailed coverage of them is beyond the scope of this book. Nevertheless, don’t for-
get that carefully testing your classes in isolation and together is key to determining that
you have successfully implemented the design.
Free download pdf