Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

Students also viewed these Databases questions