Question: called 49. Design and code a new method to be exported from LinkedStringLog howMany, with the following signature: public int howMany (String element) The method
called 49. Design and code a new method to be exported from LinkedStringLog howMany, with the following signature: public int howMany (String element) The method returns an int value indicating how many times element occurs in the StringLog 50. Design and code a new method to be exported from Linked StringLog called uniqInsert, with the following signature: public boolean uniqInsert (String element) The method inserts element into the StringLog unless an identical string already exists in the StringLog, in which case it has no effect on the Stringlog. If it does insert the string, it returns true; otherwise, it returns false. 51. Design and code a new method to be exported from LinkedStringLog called smallest, with the following signature: public String smallest(0) The method returns the smallest string in the StringLog. By smallest," we mean in terms of the lexicographic ordering supported by the String class's compareTo method. As a precondition you should assume that the StringLog is not empty. called 49. Design and code a new method to be exported from LinkedStringLog howMany, with the following signature: public int howMany (String element) The method returns an int value indicating how many times element occurs in the StringLog 50. Design and code a new method to be exported from Linked StringLog called uniqInsert, with the following signature: public boolean uniqInsert (String element) The method inserts element into the StringLog unless an identical string already exists in the StringLog, in which case it has no effect on the Stringlog. If it does insert the string, it returns true; otherwise, it returns false. 51. Design and code a new method to be exported from LinkedStringLog called smallest, with the following signature: public String smallest(0) The method returns the smallest string in the StringLog. By smallest," we mean in terms of the lexicographic ordering supported by the String class's compareTo method. As a precondition you should assume that the StringLog is not empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
