Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java Write a method delete that takes two strings, str and substr, as parameters. The method will return a string which includes each character in
java Write a method delete that takes two strings, str and substr, as parameters. The method will return a string which includes each character in str but has the first occurrence of substr deleted. public static String delete (String str, String substr) Calling delete ("Labyrinthine", "in") will return "Labyrthine" Write a method that takes one string as a parameter and returns a string with each letter duplicated. Letters will appear in the same order as in the parameter. public static String duplicate (String s) Calling duplicate ("Mango") will return the String "Maannggoo" Write a method to change the name format from lastName>, to sfirstName> public static String name (String s) Calling name ("Siddiqi, Wafa") will return "Wafa Siddiqi". Write a method to check if a word is a palindrome. A palindrome is a word that spells the same forward and backward. For example "dad", "civic" and "radar". public static boolean isPalindrome (String str) Calling is Palindrome ("rotator") will return true. Calling is Palindrome ("Baba") will return false Test your program with the words: malayalam, hannah, rotator, repaper and any other non-palindrome words
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