Question: 9. Write a program that finds the recurrences of a character in a string. (16 pts) a. Use a hashmap to store each character and

 9. Write a program that finds the recurrences of a character

9. Write a program that finds the recurrences of a character in a string. (16 pts) a. Use a hashmap to store each character and how many times that character repeated in the string. I "Parallel" P:1, a: 2,r:1, e: 1, 1:3} b. Print the number of repeated characters and the sum of their recurrences. For example, in the word "Parallel", the number of repeated characters is 2 (a and I) and the sum of their recurrences is 3.14 pts c. Write a function to check if a specific character ch is there in the hashmap, if it's there, print its recurrences, if not, print "Not Found". [4 pts] void checkChar(Hashmap hm, char ch){ d. Write a code that uses lambda expression and foreach to print the contents of the hashmap. [4 pts]

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!