Solutions for programming exercise for Chapter Analysis - Exercise 1-4