Write a program to fill an array with the following five words: radar, warts, ev
ID: 3624741 • Letter: W
Question
Write a program to fill an array with the following five words: radar, warts, evil, racecar, toot.
Create a method to receive the array and print each of the words in reverse order. The word palindrome is from the Greek meaning to "run back again." Words that are palindromes will be spelled the same forward as they are backward. Have this method also determine whether any of these words are palindromes.
This is the problem I got in Computer Science class...
I want to do this myself... but I must finish it soon!!
I don't want the answers...
Can you give me some advices or hints?
I have to use BreezyGUI
Explanation / Answer
Here is a high-level suggestion of what to do, hopefully its useful.
method (string array) {
for loop to iterate through strings in array {
declare variable to hold backwards version of current string
for loop to iterate backwards (i=length; i <= 0; i--) through every character in the current word {
set the variable equal to itself plus the current character
}
print the backwards word held in the variable
compare the current word in the array to the backwards version in the variable and print result
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.