Class assignment to add function to class provided in book.