Question: JAVA PROGRAM: File Operations You are to write a program that reads in a body of text, and performs some queries on the text. You
JAVA PROGRAM:
File Operations
You are to write a program that reads in a body of text, and performs some queries on the text. You will write the results from the operations into an output file. You will submit the output file along with your code and pseudo code.
Details
The purpose of this exercise is to give you familiarity with File Operations. You will read in a lengthy text file; Bram Stokers Dracula as text from guttenberg.org http://www.gutenberg.org/ebooks/345.txt.utf-8. If you have problems search for 345 on Gutenberg.org, and select the Plain Text UTF-8 link. As you read the text you will map all words to lower case, and remove all punctuation characters (Only numbers and letters should remain). Once the words are pre-processed you will determine the following items. Do not modify the text file you download, although there are headers and footers from Gutenberg, please leave them intact.
When the file is completely loaded you will perform queries to exhibit the following things:
How many times do the following words appear in the text? o transylvania o harker o renfield o vampire o expostulate o fangoriously
What is the length of the longest word?
How many total words are there in the processed text?
Write the output from the questions above to a file named project3.out No User Interface is required for this project.
Suggestions (Use at your discretion) Download the text file to your local machine. Write a program to open the text file and display it verbatim before you start adding it to the table. The individual chains can contain information to help with the queries (length of chain, etc).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
