The situation I have is that I currently have a LinkedList of 'Appointment' objects which have the following attributes:
'patient' 'date' 'type'
The only functionality required is to loop through this LinkedList and display each appointment in order of 'date'. So, each time a new Appointment is created (using a method called 'addAppointment' in the same class as the LinkedList of appointments), the method will sort the linked list using a Comparator.
However, I was wondering if this is bad practice and if there is a better way to do this? I never need to get the 'Appointment' object by its index and so would it be better practice to use a Priority Queue?