Added solution to the programming assignment 2