Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java: Create a multithreaded program that reads all text files in a directory given by the user and creates a single output text file that

Java: Create a multithreaded program that reads all text files in a directory given by the user and creates a single output text file that counts the frequency of words found in all text files, combined. Ignore punctuation and symbols. Only words should be counted, and the program should automatically process ALL words in all input text files in the directory

example: suppose in a /textfiles directory, there exists:

input1.txt : "hello world"

input2.txt : "hello everyone"

input3.txt: "This is world for everyone"

input4.txt: "We are the world"

----------------------------------------------------------------------

Then either in the same directory or in a different directory, an output.txt file must contain:

hello: 2

world: 3

everyone: 2

is: 1

for: 1

this: 1

are: 1

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_2

Step: 3

blur-text-image_3

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions