Question: Csc help Write a class called TelDirectory that implements the comparable interface. The class should contain tow fields name (String) and phone number (String). Write
Write a class called TelDirectory that implements the comparable interface. The class should contain tow fields name (String) and phone number (String). Write the necessary constructors, accessors, mutors and other methods. Write client class that creates an ArrayList of 10 TelDirectory objects called list. -Point the list. -Call Collections.sort(list), to sort the elements according to the name. If the names are the same the sort the list using the phone number. -Print the sorted list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
