Final ASSG 4

Just changed to System.in  for input.