Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Java - Prompt the user to enter a list of strings. This could be a list of names, cities, sports teams, etc. The user can

*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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

ISBN: 0764549634, 9780764549632

More Books

Students also viewed these Databases questions