Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment, we will implement some methods for lists of words. Some of these may be relevant to the later game assignment, others are
In this assignment, we will implement some methods for lists of words. Some of these may be relevant to the later game assignment, others are for practice.
All of the following methods should be defined in ILoWord. You may need to design helpers for some of the methods as well.
When referring to strings, this is known as a caseinsensitive sort, since when it examines two strings, it converts everything to lowercase or uppercase would it make any difference? before comparing them, so the comparison cant useor be sensitive todifferences in casing.
Design the method sort that produces a new list, with words sorted in alphabetical order, treating all Strings as if they were given in all lowercase. You may use insertion sort as we did in lecture.
Note: The String class defines the method toLowerCase that produces a String just like the one that invoked the method, but with all uppercase letters converted to lowercase.
Design the method isSorted that determines whether this list of IWords has words sorted in alphabetical order, in a caseinsensitive way.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started