project 4  for java 2