Answered step by step
Verified Expert Solution
Question
1 Approved Answer
: 1. Create a new project and add a JFrame that you will use to design the graphical interface for the user. a. Add a
:
1. Create a new project and add a JFrame that you will use to design the graphical
interface for the user.
a. Add a textArea that the user will enter the text to be analyzed.
b. Add one button to trigger that analysis of the text.
c. Add enough labels to display the results from the methods described below.
2. Create a private method named isPalindrome. It should take a String as an argument
and return a boolean result that indicates if the string is a palindrome (true is a
palindrome; false is NOT a palindrome). Please remove any non-alphabetic and non-
digits characters as well as all whitespace and ignore the case of the characters when
determining if the string is indeed a palindrome.
3. Create a private method stringStats. It should take a String as an argument and then
returns an array of int. This function needs to calculate the following statistics and
return them in the following order:
a. number of alphabetic characters
b. number of numeric digits
c. number of control characters (ACSII characters from 0 to 31)
d. number of lower case characters
e. number of upper case characters
f. number of whitespace characters
4. Add an event to the button and call both of the above methods passing the text of the
textArea. Using the result of the isPalindrome method display the results on the form in
a clear manner. Using the returned array that is sent back from the stringStats method
display the statistics of the characters used in the textArea.
5. Test your application thoroughly to be sure it is working accurately. It may be difficult
to enter control characters but you should find that the program will find some without
much effort
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