subject

Eclipse(java)write a program that analyzes text written in the console by counting the number of times each of the 26 letters in the alphabet occurs.
uppercase and lowercase letters should be counted together (for example, both âaâ and âaâ should count as an a).
any characters that are not letters should be ignored. you must prompt the user to enter the text to be analyzed.
then, for any letter that appeared at least once in the text, print out the number of times it appeared (and do so in alphabetical order).
an effective way to count characters is to read from the console string-by-string, and loop through all of the characters of each of these strings.
similar to problem a, the hasnext() method of the scanner will be useful, and when testing in eclipse, press enter and then, once on the empty line, press ctrl-d when you are done typing the text.
you must use an array to keep track of how many times each letter is seen in the text.
the array should have 26 elements (one for each letter in the alphabet).
index 0 should be used to track the number of aâs in the file, index 1 to track the bâs, index 2 to track the câs, etc., up to index 25 for the zâs.
you could use a massive if/else block, but the whole reason to use arrays is to make your programs easier.
so, instead, think about how to convert each character you read into the correct index and then increment that value in the array.

for example, if you read an a, then you should increment the value in index 0. specifically, you will need to determine if the character is an uppercase letter (between âaâ and âzâ), a lowercase letter (between âaâ and âzâ), or something else. if it is a letter, convert it into the appropriate index. recall that characters and integers are interchangeable via the ascii table conversion1. consider this example to get you started: char input = 'z'; int index = input - 'a'; // index equals 25, as 'z' is 122 and 'a' is 97you have been supplied junit tests for several example input texts, including an empty text, one with no letters, upper/lower/mixed case letters, and hello world.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
You know the right answer?
Eclipse(java)write a program that analyzes text written in the console by counting the number of tim...
Questions
question
History, 11.03.2021 21:40
question
History, 11.03.2021 21:40
question
Mathematics, 11.03.2021 21:40