Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program called SearchText. java that: 1. Prompts the user for a text file pathname. 2. Prompts the user for a search string. 3.
Write a program called SearchText. java that: 1. Prompts the user for a text file pathname. 2. Prompts the user for a search string. 3. Reads in all of the text in the file. 4. Splits that text into an array of words. 5. Prints a list of every word that contains the search string. 6. After that list, prints a count of how many words contain that search string. For example, running this program for the file constitution. txt and using the search string qu produces the output: Tranquility requisite subsequent Consequence equally equally disqualification require question questioned question Marque Square require Consequence Marque equal equal quorum equal require Equity
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started