Question
Use Java. Prompt the user to enter a list of strings. This could be a list of names, cities, sports teams, etc. The user can
Use Java.
Prompt the user to enter a list of strings. This could be a list of names, cities, sports teams, etc. The user can enter the list of words in one list, or individually after pressing enter after each entry.
Parse the list of strings into an array. (There are two primary ways you can design this, either using a for loop, with the user entering one word at a time, or by splitting the entire list in one step.)
Prompt the user to enter the word to search for. (Example; Seattle, or Seahawks, or Canada, etc)
The program should search the array for the search word, and determine if the search word exists in the array. If the word exists more than once, it should produce a count of the number of times it exists.
The program will then output the list of words, the search word, whether the search word exists in the list (yes or no), and if it does exist, how many times it is found in the list.
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