Final Assignment 2

Final code. Successfully tested for output