Completed java lab 4