When there is no appointment dates, list remains the same which may confuse users.
output of sort
Suggested Improvements
Some of the improvements I can think of:
Update the user guide for the sort command to specify that contacts will be sorted by appointment dates, then any contacts without appointments will remain sorted alphabetically at the end of the list.
Display an error message when no contacts have appointment dates, such as No contacts with appointment dates found.
When there are no contacts with appointment dates, display only the error message (as in suggestion 2) and an empty list to indicate no results for sort.
I prefer 1 and 2, rather than returning an empty list, because the user will have to make an unnecessary additional command list just to get the list back
Description
When there is no appointment dates, list remains the same which may confuse users. output of
sort
Suggested Improvements
Some of the improvements I can think of:
No contacts with appointment dates found.