Question: Create a project called AssignmentOne_StudentNumber With StudentNumber being your student number i.e AssignmentOne_32323 Zip the whole project folder and upload your folder as AssignmentOne_StudentNumber.zip Add
Create a project called AssignmentOne_StudentNumber
With StudentNumber being your student number i.e AssignmentOne_32323
Zip the whole project folder and upload your folder as AssignmentOne_StudentNumber.zip
Add your Student name, and ID as a comment at the top of each file, Use the sample code given for testing
Part One
Write a recursive function, called reverse, that takes a String as an argument and uses recursion to print it backwards. For example, reverse("hello") outputs: olleh.
---------------------------------------------------------------------------sample code ----------------------------------------------------------------------------
/* * Student name: * * Student number: */ import java.util.*; public class Assignment01{ public static void main(String args[]){ //test reverse //======================================== //test power //======================================== //test anagramChecker //======================================== } static void reverse(String word){ //assume a <= b } static int power(int base, int exponent){ if(exponent == 0) return 1; else return base * power(base, exponent -1); }
static anagramChecker(String a, String b){ } }
--------------------------------------------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
