e). Implement the method getMinDistance within the
Lexicon class. This method receives an ArrayList of WordDistance
objects as parameter and returns the WordDistance object with the
minimum edit distance. If there are several matches, it returns the
one with the lowest index. Note. This method might not seem easy to test as you have to provide an ArrayList as a parameter when you invoke it. In order to make the task easier you could use the ArrayList returned by the previous exercise. This is how you do this. First invoke the method in the previous exercise (getEditDistances) with a parameter of your choice. When the Method Result window reporting the returned ArrayList appears, click on the button labeled Get. What this means is that the returned value will be captured and will appear as one more object in the object's bench. A new pop up window will appear asking for the name of the instance, you could accept the suggested name (arrayLis1 or something like that). Now close the Method Result window. You will notice that a new object has indeed been added to the object's bench. This is the object you can use to test this exercise's method. In order to do this, when you invoke the getMinDistance method and the Method Call window appears, simply click on the ArrayList instance in the object's bench and the name of that object will appear as the parameter. Simply click Ok now and the method will be invoked with that object as parameter.