here is my code of the programming assignment 2