You will write a class called A0 that contains 3 public methods that perform the functions described below. You may want to write other methods to act as helpers.
You will also write a class called A0driver that will test your three methods.
Write a method called isEvenAscending that takes an array of integers as a parameter and returns true if the array of integers contains a list of even integers in ascending order, and false otherwise.
The following are valid sequences of ascending even integers:
The following are not valid sequences of ascending even integers:
Write a method called isSquareSequence that takes an array of integers as a parameter, and returns true if the array of integers is a sequence of squares and false otherwise.
A sequence of squares is defined as
2 2 2 k , (k+1) , (k+2) , ...
So the following are sequences of squares:
But the next set are not sequences of squares
Write a method called isPalindrome that takes a String as a parameter and returns true if the string is a palindrome and false otherwise.
A palindrome is a word, phrase or sentence that reads the same forward and backward.
Here are some examples of palindromes:
See palindromes.org for a longer list.
Note that spaces and punctuation don't count. Also a palindrome is case insensitive (A equals a).
Your method must not be recursive (don't worry if you don't know what recursive means), and it must not modify the string parameter, or create a temporary array or string. (The purpose of these restrictions is to get you to think about how to traverse the string.)
Please note that approximately 30\% of the marks will be allocated to programming style and comments.