Added The code for Assignment2