Question: This is in Java Language Please do everything listed below! There is no sample output just write the two methods needed. public class WordTester {
This is in Java Language
Please do everything listed below!

public class WordTester { This question involves the reasoning about arrays of Strings. Given an array of String values, the program will determine if the array contains the same number of words as a specified phrase. It will also check to see if one of the words in the phrase exists within the array // instance variable mywords contains the array of String values storing the words. 1/ instance variable myNumWords contains the number of words found in the phrase. // instance myTargetWord contains a target word from the phrase that is to be located in the array 1/ constructor accepts a String array with the words, an int representing the number of words in the phrase and a string representing the target word. 1/ There may be other instance variables, constructors and methods not shown private String [] myWords ; private int myNumWords; private String myTargetWord; public WordTester (String [] words, int numWords, String targetWord) { myWords = words; myNumWords = numWords; myTargetWord = targetWord; } You will write two methods. One method will determine if a specific String value is located within the array and the other method will determine if the array of Strings has the same number of elements as there are words in the phrase. The class looks like this: public boolean isWithin() { // to be implemented in Part A } public boolean sameNumber() { // to be implemented in Part B Part A & Part B Instructions }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
