Java exercises from course work.