File updated with the code for the programming assignment 2