Question: Exercise 2A [5%] Create a class called TextIO. Exercise 2B [25%] Add a public and static method called readText that returns TextStatistics. The method should

Exercise 2A [5%] Create a class called TextIO. Exercise 2B [25%] Add a public and static method called readText that returns TextStatistics. The method should have a String parameter that specifies a file name (and optionally path). Read the specified file and count the frequency of each Latin letter and Arabic number and update the frequencies in the TextStatistics object that the method returns. Your method should declare an appropriate exception. Should you have not completed Exercise 1, add a private an int array with 36 elements to store the frequencies of alphanumeric symbols in the text. Store the Latin letters in the text in the first 26 elements and the Arabic numbers in the last 10 elements. Return the array instead of the TextStatistics object. You can test this class using input.txt

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