The other three cases

Each of the remaining three cases in the switch statement is very similar to the code in Listing 4.

Those three cases deal with:

Because of the similarity of the code, I won't discuss it in detail.

You can view that code in Listing 6.