Chapter 2: Library Classes(Solution)