(a) Modify and extend the method that calculates the sum of the integers between 1 and N shown in this chapter. Write a method sumOfSquares that would return the sum of squares of N integers, from 1 through N.
(b) Write a recursive method that returns the value of N! (N factorial) using the definition given in this chapter. Explain why you would not normally use recursion to solve this problem.
(c) Write a recursive method to reverse a string. Explain why you would not normally use recursion to solve this problem.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here