Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 states in the United States as the input text.
It uses the bad character rule of the BoyerMoore 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 Display the text, the application displays the content of the text ie the names of states in the United States
When a user selects 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 BoyerMoore algorithm. Then, the application displays the indices of the matches ie occurrences of the pattern in the text
When a user selects Exit program, the application ends.
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