Computer Science Assignment

computer science


In coming up with a solution to this I noticed a lot of annoying errors that had to do with string casing. We probably should allow for case insensitivity in our spell checking. The problem here is the generic parameter <E> in our chapter 24 sample code. As far as java is concerned it considers <E> as a raw object. A raw object has an equals method, but no concept of equalsignorecase. We need to tell java to assume <E> will be a string so we can use the equalsignore case method. Here is the easiest way to fix this:

In your MyLinkedList class, define it as follows:

public class MyLinkedList<E extends String> extends MyAbstractList<E> {

Related Questions in computer science category