While working on the tasks below, you are free to request assistance on D2L at:
Communications / Discussions
Submit your source code only, uploading to D2L at: Assessments / Dropbox / assignment_8.
Your score depends on the following items:
• (15%) Program is adequately documented. It’s comments identifies its name, purpose, author and date. Throughout the code, comments and/or relevant component names should attempt to make the program understandable.
• (15%) The program compiles without error, runs and pertains to the assignment.
These tasks entail developing a single program that contains methods of the following tasks. Your program may run either on the command-line or as an applet.
1. Write four methods that take a word input by the user (11%) and then:
a. (11%) splits the word into a unicode character array
b. (11%) determines if the input word is a palindrome – the same frontwards and backwards.
c. (11%) sorts the unicode character array according to their unicode decimal values.
d. (11%) generates statistics based on the max, min, and average of the unicode value array.
To accomplish item b, consider using one or more loops so that elements of an array can be compared.
For item c, if an array’s value in the outer loop is greater than that of the inner loop, the values are swapped. This is a bubble sort – more here: http://mathbits.com/MathBits/Java/arrays/Bubble.htm
(Don’t use one of the built-in sort methods; you need to code your own, as shown at the link.)
2. (15%) Employ JTable for an applet that displays the results of the above tasks. Hint: you may want to have single array accumulate rows 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.