assignment 6 with java doc