Question: About this Assignment In this course, you have learned about text as a data structure, string searching algorithms, trie data structure, and methods for compressing

About this Assignment
In this course, you have learned about text as a data structure, string searching algorithms, trie data structure, and methods for compressing texts. For this assignment, you will develop an application using the Java programming language.
Prompt
The application must address the following requirements:
The application uses the names of 50 states in the United States as the input text.
It uses the bad character rule of the Boyer-Moore algorithm to search the pattern a user inputs via an interface.
When a user runs the application, it displays a menu and prompts the user to select an option.
The menu options are:
Display the text
Search
Exit program
When a user selects 1) Display the text, the application displays the content of the text (i.e. the names of 50 states in the United States).
When a user selects 2) Search, the application prompts the user to input a part of the name of a state as a pattern for search. The application searches for the pattern in the text using the bad character rule of the Boyer-Moore algorithm. Then, the application displays the indices of the matches (i.e. occurrences of the pattern in the text).
When a user selects 3) Exit program, the application ends.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!