Question: Write a program named MidtermAnalysis to analyze data in a text file. In MidtermAnalysis, you should have the following methods: public void read(String filename)

Write a program named MidtermAnalysis to analyze data in a text file.

Write a program named MidtermAnalysis to analyze data in a text file. In MidtermAnalysis, you should have the following methods: public void read(String filename) throws FileNotFound Exception public void report() throws FileNotFoundException The parameter in the read() is the filename that you want to read. You should create a text file named "data.txt" in this question which contains the sentence as shown in Figure 2. You should then count the number of words in the sentence and find the longest word in the sentence. The report() method is to write the result of analysis to another text file named "Result.txt". You should write the number of words and the longest word in the sentence when you call the report() method. This is midterm test for Data Structure and Software Design. Figure 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The simple java program that fulfills the requirements you mentioned import javaioFile import javaio... View full answer

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!