[Solved]Java Programming Please Help Following Assignment Thank Student Learning Outcomes Complet Q37060982
Java Programming: Please help with the following assignment.thank you.
Student Learning Outcomes. After completion ofthis lab, students will be able to write a Java Program that
- creates a class that has a recursive method
- write an effective recursive method
- test a the recursive method
Activity:
- Create a class called Sentence
- The Sentence class will determine if a phrase(substring) is within a sentence object, for example “ing” iscontain in the sentence “The boy is running”.
- Instance variable – String that represents a sentence.
- Constructor – single parameters that sets the instancevariable
- Methods
- Accessor and mutator for the sentence
- find method
- takes in a String parameter that represents thetarget substring, (what we are looking)
- returns true if the substring occurs in the sentence, false ifit doesn’t occur.
- Must use recursion and use this algorithm
- If sentence starts with the target substring returntrue
- If not, test the rest of the sentence recursively.
- Remember to include stopping base case(s).
- Enhancement (Optional)
- create an indexOf method
- takes in a String parameter that represents thetarget substring, (what we are looking)
- returns the index in the Sentence of the first occurence of thetarget substring or -1 if not found
- Must use recursion
- One approach is to use a recursive helper method
- The purpose of a “helper” recursive methods is, in general, tohide the counting of something. They usually have (at least) oneadditional parameter that somehow describes how far the recursionhas already proceeded or how far it still has to proceed. In ourcase the helper method extra parameter would be where the newstring starts, and that parameter would be returned when thesubstring is found.
- create an indexOf method
- Create a SentenceTester class
- Create a Sentence object.
- Test several phrase including several with match throughout thesentence and some that do not match.
Expert Answer
Answer to Java Programming: Please help with the following assignment. thank you. Student Learning Outcomes. After completion of t… . . .
OR

