Prompt: Recursive Functions Exploration
In this lab, you'll explore the concept of recursion by creating a java console application that implements recursive functions to solve various problems.25 points for each
Requirements:
1.Factorial Calculation: Implement a recursive function factorial(n) that calculates the factorial of a given non-negative integer n. The factorial of a number n, denoted as n!, is the product of all positive integers less than or equal to n.
2.Fibonacci Sequence: Implement a recursive function fibonacci(n) that computes the nth number in the Fibonacci sequence. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. The sequence starts with 0 and 1.
3.Power Function: Implement a recursive function power(base, exponent) that calculates the result of raising the base to the power of the exponent. Assume both base and exponent are integers, and exponent is non-negative.
4.Palindrome Checking: Implement a recursive function isPalindrome(str) that checks whether a given string str is a palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward.
Bonus (10 points)
Implment using a gui(Jframes or JoptionPane is acceptable)