Question
Write a Java class named StringStatistics that prompts the user to enter a string. If the entered string is empty, quit the program. Otherwise, analyze
Write a Java class named StringStatistics that prompts the user to enter a string. If the entered string is empty, quit the program. Otherwise, analyze the entered the string, and report the following findings: 1) The number of alphabetical letters contained the string. 2) The number of digital letters contained in the string. 3) The number of upper case letters contained in the string. 4) The number of lower case letters contained in the string. 5) The number of letter e contained in the string. 6) Is the string initialized with letter A?
Outputs:
Please enter a string: Happy Spring 2020 Semester
There are 19 alphabetical letters.
There are 4 digital letters.
There are 3 upper case letters.
There are 16 lower case letters
There are 3 es in the string.
The string does not initiate with A.
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