Question: 1 . Create a class called MyWord that: a . stores only one thing: a character array ( char [ ] ) . b .
Create a class called MyWord that: a stores only one thing: a character array char b implements the Comparable interface. i When you are comparing two MyWords, you are not allowed to use any of the builtin String methods. ii When sorted, MyWords should appear in reverse alphabetical order. For instance, dog comes before cat. Capitalization does not matter. dog should come before Cat, and Dog should come before cat. iii. Finally, remember that equality and order comparison should be in sync That is your MyWord class should also implement whats necessary so that when two MyWords are compared for equality, the result is in sync with the result from being compared for order
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
