The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Java Programming
Please Help!!
I've already compiled 4 separate files into one to form "alice.txt"
Everyone in my class needs help, so please help.
As Alice is wandering about, she wonders: A????1How many letters of the English alphabet are in my story?A????1 Luckily, you were able to merge the individual files back together to the complete story in A????1Alice.txtA????1 and offer to help wondering Alice. Write a program that reads in the file A????1Alice.txtA????1 (in Blackboard) and counts the occurrences of regular letters in the English alphabet and prints their numbers out afterwards.
Hints:
- We are only interested in letters, not their case
A????1 in turn, A????1aA????1 is the same as A????1AA????1
- String has a function .toLowerCase()
- Read line by line
- There are 26 letters in the alphabet
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll