Solved Programming Assignment 2 under same document