/** prints the given list */
public static void printList(int[] someList)
/** returns the given list in the desired order
* Direction will either be "ASC" or "DESC" written
in all caps just how it appears here.
* ASSUME that there will be no typing errors (user will either write ASC
or DESC correctly.)
*/
public static int[] sort(int[] someList, String direction)
To test your methods, uncomment the items commented out for part 2.You should do all of this inside of an application program called "Part 4".
The program should work as follows:
It displays to the user "Press 1 to test a word, Press 2 to create
your own palindrome"
If the user enters a 1
-------Ask for a word, then call a method public boolean isPalindrome(String
word) that returns true if it is, false if it is not.
-------Tell the user if they entered a palindrome.
If the users enters a 2
------Ask for a sequence of letters.
-----Then call a method public String createPalindrome(String
word) that returns a palindrome with that sequence.
EXAMPLE
user enters a 1: types "radar", program prints "Yes,
that's a palindrome!"
user enters a 1: types "salalalad", program prints, "No,
that is not a palindrome."
user enters a 2: types "abcdef", program prints, "Your
palindrome is: abcdeffedcba"
Part 4 Extension: ENHANCED
CREATE PALINDROME
If a user enters a 2: THEN ASK if they would like to duplicate
the final character in the array
If they say YES, then it should appear like the example above ("abcdeffedcba")
If they say NO, then it should appear like ("abcdefedcba")
****YOU WILL DEFINITELY NEED TO VISIT THE API FOR HELP WITH STRING MANIPULATION****