Solved: Write a program called CountLetters.java…

$30.00

Category:

Description

Solved: Write a program called CountLetters.java…

Write a program called CountLetters.java that prompts the user for the name of a text file, reads in all of the text in that file, and then computes and prints a table of letter frequencies. For example, if the file is the text of the U.S. constitution, the program will print:

Enter the name of the file: data/constitution.txt

a        2,660

b          611

c        1,190

d        1,223

e        5,108

f        1,018

g          439

h        2,019

i        2,486

j           95

k           53

l        1,478

m          725

n        2,635

o        2,739

p          764

q           46

r        2,187

s        2,693

t        3,755

u          843

v          473

w          372

x          124

y          503

z           31

 


error: Content is protected !!