package text;

/**
 * This class implements a sentence with some basic search methods.
 *
 * @author <TODO: Your Name Here>.
 */
public class Sentence {
	private String text;
	
	/**
	 * Constructs a sentence object with the given text.
	 *
	 * @param text
	 */
	public Sentence(String text) {
		this.text = text;
	}
	
	/**
	 * Searches for the given string in this sentence.
	 *
	 * @param t
	 * @return true if t is in this sentence
	 */
	public boolean find(String t) {
		// TODO: implement this method recursively, you may use a helper method
		throw new RuntimeException("delete this line");
	}
	
	/**
	 * Finds the starting position of the first substring of this sentence that
	 * matches the given string.  Or returns -1 if t is not a substring of this
	 * sentence. 
	 *
	 * @param t
	 * @return the starting position, or -1 if not found
	 */
	public int indexOf(String t) {
		// TODO: implement this method recursively, you may use a helper method
		throw new RuntimeException("delete this line");
	}
}
