The doSelection function

The function named doSelection is called once during each iteration of the loop in Listing 7

The doSelection function is shown in its entirety in Listing 8.