Using Eclipse: Create a Java class SearchableSentence that stores a single sente
ID: 657445 • Letter: U
Question
Using Eclipse:
Create a Java class SearchableSentence that stores a single sentence and has the ability to be searched in much the same way that a word processor would search a document. Rather than finding the location of the search string as a word processor might, your class will return a count of the number of occurrences of the search string within the sentence.
Objects of this class should be able to be constructed with a single parameter containing the sentence itself. The class should contain at a minimum a method searchCount() that accepts a search string and returns the number of occurrences of that search string within the sentence. The search can be done in a case-sensitive way.
For example if the sentence searched in is The theory of Theo is that the other things are a bother. and the search string is