This is one of the tasks for Core Java Course I am attending at the university.