Code written in Java for a online course