Write methods that take a word input by the user Solution


1. Write methods that take a word input by the user (10%) and then:
a. (10%) splits the word into a unicode character array
b. (10%) determines if the input word is a palindrome – the same frontwards and backwards.
c. (10%) sorts the unicode character array according to their unicode decimal values.
d. (10%) generates statistics based on the max, min, and average of the unicode value array.
To accomplish items b and c, consider using a nested loop so that an array can be compared to itself.
For item c, if an array's value in the outer loop is greater that that of the inner loop, the values are
swapped. This is a bubble sort – more here: http://mathbits.com/MathBits/Java/arrays/Bubble.htm
2. (10%) Employ JTable for an applet that displays the results of the above tasks. Hint: you may want
to have single array accumulate rows from from the tasks. Think of how you can handle varying
dimensions for output to be a single applet. Or, alternatively, have the user select which output to
display in a different sized JTable.
3. (10%) Incorporate a Java collection covered in lecture 9 into your final proje

Powered by