programming assignment 1(week 1 & 2)

did not design good modularization. should do it better for assignment
2.