Question: Create a program called StringModsLastNameFirstName.java. You will have 4 methods in this program. main: Prompt the user to enter two strings, an integer, and a

Create a program called StringModsLastNameFirstName.java. You will have 4 methods in this program.
main: Prompt the user to enter two strings, an integer, and a double. Call the other three methods. Display the result of the method calls. Repeat until the user does not want to continue.
stringMod: Has a string and an integer (n) for parameters. Remove each nth character in the string. Return the resulting string. For example, "Hello World" with 4 would give "Helo Wrld".
stringMod: Has a string and a double for parameters. Replace each 'e' in the string with the value of the double. Return the resulting string. For example, "Hello World" with 3.8 would give "H3.8llo World".
stringMod: Has two strings as parameters. Create a new string that alternates letters from the two strings. If one string is shorter than the other, it repeats letters from that string until the end of the longer string is reached. Return the new string. For example, "Hello World" and "Java" would give "HJealvlaoJ aWvoarJladv".

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 Programming Questions!