Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Create a Java program to develop skills implementing Java syntax, including: .Compile and run a simple program . Design a class definitions Create class

image text in transcribed
image text in transcribed
Objective: Create a Java program to develop skills implementing Java syntax, including: .Compile and run a simple program . Design a class definitions Create class methods . Develop String manipulation techniques Utilize methods in the String and Character classes Overview In this assignment you will create a graphical Java application. Using this application user will be able to perform some analysis on text. The analysis will allow the user to check if the data entered is a palindrome and will also report several other statistics of the usage of the characters that comprises the entered data Helpful tip: There are several Java classes that you may find useful for this application. These classes are String, StringBuffer, StringBuilder and Character. The documentation for these classes can be found in the Java documentation on the Oracle site under the Java.lang package (See http://docs.oracle.com/javase/8 docs/api Steps: 1. Create a new project and add a JFrame that you will use to design the graphical interface for the user. a. b. c. Add a textArea that the user will enter the text to be analyzed. Add one button to trigger that analysis of the text. 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. 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: 3. 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 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 textArca. 4. 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. 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago