Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This task has the following elements that are relevant to the learning outcomes of this module: - TBD - TBD - TBD - TBD You

This task has the following elements that are relevant to the learning outcomes of this module:

- TBD

- TBD

- TBD

- TBD

You need to create a GUI based search engine that will recursively browse files in a folder and find every time a particular word occurs in the files. The program must:

You need to create a GUI based search engine that will recursively browse files in a folder and find every time a particular word occurs in the files. The program must: Get path to folder / file and a word to search for. If the specified path points to a file or folder then it should continue, otherwise write an error message to TextArea. Using recursion it should go through all the folders and files and search for a specific word. If you find a match then you should print path to file and line order is on. Finally, print out how many folders and files you have searched through and the number of times the word has appeared in the files. Example of the application's appearance is:

image text in transcribed

Tips: file.listFiles () method returns an array of files and folders inside the file object, if it is a folder. Create a help method called find word and used to search for words in a file. Think about the base case in this task, when should you stop calling the method recursively? What to do if File is a folder and what to do if it is a file?

You must submit a Java file: FindWordInFile.java.

Find word in files Directory or filename Word Search Search start. /home/mormonjz/Projects/vehicle-solution/.idea/workspace.xml: /home/mormonjz/Projects/vehicle-solution/. idea/workspace.xml: home/mormonjz/Projects/vehicle-solution/README.md: to fork this example project on source.uit.no simply click on fork link in the upper right corner on the project main page, like here /home/mormonjz/Projects/vehicle-solution/src/TestVehicles.java: public static void main(string[] args) Search end Searched: 56 directories and 91 files, found 6 occurrences of "main" Search start. Hello there. does not exist

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

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions