Java coursework for SD1