Created display function for exercise 3a.
Add set_volume function.
Copied listing 7.4.