Chapter 4 exercise

Chapter 4 exercise from “Beginning Ruby” by Peter Cooper