Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone PLEASE help me? I've tried so many things for these three seperate problems. It is greatly appreciated. The language is Java. Just make
Can someone PLEASE help me? I've tried so many things for these three seperate problems. It is greatly appreciated. The language is Java.
Just make up your own input. Write as three separate codes, one for each problem. 1. stringMiddleEllipsis: Produce a (trimmed) string three dots are inserted I exactly in the middle of the string. If the string has an odd number of characters, then insert the dots after the middle character. For example, if the input is muffin, the output should be muf...fin. If the input is barbed- wire, the output should be barbed...-wire. Complete this task without using an if statement 2. stringAllButSecondToLastWord: Produce a trimmed) string that is identical to the input, except that the next-to-last word (and the space that follows it) is removed. For example, if the input is I love chewy bubble gum, then the output should be I love chewy gum. 3. stringFirstThree Quarters: Produce a (trimmed) string that contains only the first 75% of the characters that are in the input. If the number of characters is not an exact multiple of 4, "round up to the whole number that is above 75%, but is as close as possible. For example, if the input is the 12-character string Jacob Marley, then the return value should be the_9-character string Jacob Mar. If the input is the 10-character string Jackhammer, then the return value should be the 8-character string Jackhamm. Complete this task without using an if statement. Mockcok ProStep 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