In order to cause the buttons to impact the behavior of the program,
I will do that using anonymous classes.
Note, however that the student is not required to use anonymous classes.