Question
So, In this lab I am doing I am trying to make a program in java and I need help Here are the steps on
So, In this lab I am doing I am trying to make a program in java and I need help
Here are the steps on how to do the lab
1. In this lab you will try to determine whether a string is a palindrome. A palindrome is a string that reads the same backward or forward.
2. Here are the looping steps you will implement:
3. Ask the user to type in a string (contains no white space characters);
4. Read the string from the standard input;
5. Check whether the string is a palindrome;
6. Print out answer onto the screen;
7. If the user enters an empty line then the program exits, otherwise go back to step a and ask the user to type in another string then repeat the steps.
8.You will not create anything in the collection package.
9.You will create a Lab4 class under the lab package.
10.In the Lab4 class you will create a static void test() method and another static method to verify whether the user input string is a palindrome.
11. You are required to implement your palindrome verification method as a recursive method.
12. Your test method should call the palindrome verification method to verify each input string.
13. Under the main package, in the Main class, remove (or comment it out) the contents of the main method we have added in the last lab (or project) and do the following:
Lab4.test();
Compile and test your implementation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started