Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in this project, directions are important to follow Create a new Java class called: CharCount Write a program that will read a line of text,
in this project, directions are important to follow
Create a new Java class called: CharCount Write a program that will read a line of text, and will display all letters in the text along with the number of times the letter appears in the text. Your program should begin by asking the user to enter a line of text. Once the text has been entered then you should proceed to go through the text, counting the number of times you see each letter. After you have finished counting, display each letter found, along with the number of times the letter occurs The following is an example of what your MIGHT see on the screen when your program runs. The exact output depends on what values that he user ypes in wihile the program runs. The user's npute values are shown below in italics: Enter a line of text: How now, brown cow? Letter frequencies: b-1 c1 h-1 n2 w4 Technical Notes & Hints: You should allow both uppercase and lowercase letters to be entered, but count uppercase and lowercase versions of the same letter as being equal (Hint you can use the tolowerCase method in the String class to help) You must write a method called countLetters, which will receive a String (a line of text) as a parameter. The method will count the number of times each letter appears in the text. The method should return an array of integers (which will be the count of each letter)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started