The document describes Java code for a lab exercise that creates a Paragraph object using a Word class. The main method gets text from the user, creates a Paragraph with the text, gets the text from the Paragraph, creates a Word object with the text, and calls the Word's modifiedText method. The modifiedText method takes a substring and word from the user, finds occurrences of the substring in the text, and appends the word to create a modified text which is returned.
The document describes Java code for a lab exercise that creates a Paragraph object using a Word class. The main method gets text from the user, creates a Paragraph with the text, gets the text from the Paragraph, creates a Word object with the text, and calls the Word's modifiedText method. The modifiedText method takes a substring and word from the user, finds occurrences of the substring in the text, and appends the word to create a modified text which is returned.
The document describes Java code for a lab exercise that creates a Paragraph object using a Word class. The main method gets text from the user, creates a Paragraph with the text, gets the text from the Paragraph, creates a Word object with the text, and calls the Word's modifiedText method. The modifiedText method takes a substring and word from the user, finds occurrences of the substring in the text, and appends the word to create a modified text which is returned.