displayContents function to display task.