Question: Exercise 3- 5% Instructions Create Java method for the following questions. 1. Write a method that takes a string as input and returns the reverse

Exercise 3- 5% Instructions Create Java method for the following questions. 1. Write a method that takes a string as input and returns the reverse of the string. For example, if the input is "Hello", the method should return "olleH". (4 Marks) 2. Write a method that takes a string as input and returns true if the string is a palindrome (reads the same forwards and backwards), and false otherwise. For example, if the input is "radar", the method should return true. (4 Marks) 3. Write a method that takes an integer as input and prints the Fibonacci sequence up to that number. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. For example, if the input is 10, the method should print: 0, 1, 1, 2, 3, 5, 8. (4 Marks) 4. Write a method that takes an integer as input and calculates the factorial of that number. The factorial of a number is the product of all positive integers less than or equal to the number. For example, if the input is 5, th

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!