java java java object-oriented problem solving