The getMax function

The getMax function is shown in its entirety in Listing 7.