III. Programming tasks

A1 (30%). Write a program with methods that:
 a) take a word input by the user
 b) split the word into a Unicode character array
 c) determines if the input word is a palindrome – the same frontwards and backwards. d) sorts the unicode character array according to their unicode decimal values.
 e) generates statistics based on the max, min, and average of the unicode value array. To accomplish item c, consider using one or more loops so that elements of an array can be compared. For item d, 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.) A2 (20%). 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. B (30%). Write a program to check if an object is of the “Automobile” type. Demonstrate both the successful and unsuccessful object tests. C (10%). Each program above has adequate documentation. Comments include program name, purpose, author and date. Throughout the code, comments and/or relevant component names should attempt to make the program understandable. D (10%). Programs for A and B above compiles without error, runs and pertains to the assignment. To succeed, it is helpful to test your code one step at a time: code-compile-run, code-compile-run,... repeating until complete.
Powered by