Question: Write a Customer Comparator implements Comparator to rank a customer object by a his/her credit score. You may assume a Customer.java exists with
Write a " CustomerComparator implements Comparator
Then sketch codes to create a java TreeSet and to apply the CustomerComparator to the TreeSet. Create and store 3 customers (name, id, credit score, and so on) in that treeSET.
Apply TreeSet APIs to find the customer(s) with highest/lowest credit score.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
