Question: CSCI 2120 Homework 2: Recursion Introduction For this assignment you will implement two recursive methods and write JUnit tests for each one. You may write
CSCI 2120 Homework 2: Recursion Introduction For this assignment you will implement two recursive methods and write JUnit tests for each one. You may write all three methods in the same class file. For this assignment, you will be required to write Javadoc-style documentation for all of your methods, including the test methods. Procedure 1) Write a recursive method to compare two Strings using alphabetical order as the natural order (case insensitive): 50 points public static int compareTo(String s1, String s2) The function should return an integer with the following convention: s1 comes before s2 s1 == (or indistinguisable from) s2 s1 comes after s2 returns an integer less than 0 returns 0 returns an integer greater than 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
