CS 117, Backwards!
Assigned on Monday, 1/28/02.
Due on Wednesday, 1/30/02 at 9 PM.
Create a class called BackString with the following methods:
-
a constructor which allows you to give it a starting string
-
a method named "iterBackwards" that displays the string backwards, using
an iterative method (for loop)
-
a method named "recurseBackwards" that displays the string backwards, using
recursion
Create a class called BackStringMain with a single main method that creates
an instance of the class BackString, starting it off with the string "enterprise".
Your main method should then call both methods iterBackwards and recurseBackwards.
You may find the charAt() and length() methods for Strings useful.
Good luck!