Question: Write a program, NumeralCount, that receives a path to a text file as args[ 0 ] and computes for the numerals 0, .., 9 how

Write a program, NumeralCount, that receives a path to a text file as args[ 0 ] and computes for the numerals 0, .., 9 how many times they appear in the file. String. Use an int array of 10 elements in generating the counts.

The following is an example of the execution of such a program. Suppose the file foo.txt has the following contents:

dwfd08345yhkfjbg42549wrgse8y240j

3438vds0

33333087847219p85740725y8hbfwow78f\

Then the program behaves as follows:

% java NumeralCount foo.txt

0: 5

1: 1

2: 4

3: 8

4: 7

5: 4

6: 0

7: 5

8: 8

9: 2

%

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!