Question: Lab Description Create a program that will store a list of Words and perform particular operations on the list of Words. EXTRA ADD ONS Write




Lab Description Create a program that will store a list of Words and perform particular operations on the list of Words. EXTRA ADD ONS Write methods to return the Word with the most characters and Word with the least characters. Maintain sorted order. All new items should be inserted in the proper position. Removing items should not change the alphabetical order Sample Data: one, two, three, touz, five, six, seven, alligator tun, tly. tour six, tines, ten, plus, eight alligator, chicken, dag, cat, pig. battalo Files Needed :: Hord.java Hords.java Sample Output: ordRunner.ava onc to, three, four,tive, six, seven, alligator] word with 2 vowels # 5 word with 3 vowels word with 4 vowels1 word with 2 chars0 word with 3 chars3 word with 4 chars = 2 word with 5 chars after renoving words with 3 chars Ithree, four, ive, seven, alligatoz nunber of vavels in the words renoved Eun, y, tour, six, times, ten, plus, eight word with 2 vowels # 3 word with 3 vowels word with 4 vowels word with 2 chars0 word with 3 chars word with 4 chars = 2 word with 5 chars after renoving words with 3 chars Eour, times, plus, eight nunber of vovels in the words zemoved3 alligator, chicken, dog, cat, pig, baffalo word with 2 vowels word with 3 vowels1 word with 4 vowels1 word with 2 chars0 word with 3 chars3 word with 4 chars0 word with 9 chars = 1 after renoving words with 3 chars alligator, chicken, baffalo nunber of vavels in the words renoved3 import static java.lang.System.; public class Word private String word; private static String vowels "AEIOUaeiou"; 1/only one public Word () public Word (String wrd) public void setWord (String wrd) public int getNumVowels0 int count-0; return count; public int getLength() return 0 public String tostring () return import java.util.scanner import java.util.ArrayList import java.util.collections import static java.lang.System. public class Words private ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
