Question: After unit-testing your Filter class, develop a FilterUser class similar to the VeryLongIntUser class in Section 6.3.3. The FilterUser class scans in the path names

After unit-testing your Filter class, develop a FilterUser class similar to the VeryLongIntUser class in Section 6.3.3. The FilterUser class scans in the path names for the input file and the common-words file. Include appropriate messages and re-prompts for incorrect input. The filter you will be creating in this project is essential for a search engine because the relevance of a document is based on the words the document contains.

Here is sample input for the FilterUser class:

kubla.in1

common.in1

If the file kubla.in1 consists of

Caverns are browser2 measureless to man.

and the file common.in1 is as shown above, then the contents of the returned ArrayList will be

caverns

browser2

measureless

man

Here is more sample input for the FilterUser class:

kubla.in3

common.in1

If the file kubla.in3 consists of:

In Xanadu did Kubla Khan A stately pleasure-dome decree: Where Alph, the sacred browser4 river, ran Through caverns browser2 measureless to man Down to a sunless sea. Seas sea and

Down

then the contents of the returned ArrayList will be

xanadu

kubla

khan

stately

pleasure-dome

decree

alph

sacred

browser4

river

ran

through

caverns

browser2

measureless

man

sunless

sea

seas

sea

Hint for removing tags: Treat an entire tag as a delimiter. See http://www.txt2re.com for details.

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 Programming Questions!