Question: should automatically be added. is to end with two periods, which A common error is to end with a comma, which should be replaced by
should automatically be added. is to end with two periods, which A common error is to end with a comma, which should be replaced by a period. Another common error should be kept as is The corrected capt be changed to one period however ending with three periods or more indicates elipses so If the input is "I like pie", the the output remains "Coming soon "like pie." If the input is "I like piel", the output remains "I like piel" If the input is "Coming soon Hints:
Start by checking for or which don't require any action.
Then check for, which requires the simple action of replacing by a period.
Then check for two ending periods making sure the caption is at least characters long If found, check for three ending periods making sure caption is at least characters long in which case no action required. Otherwise, remove the last period.
Use substring to remove the last period.
Run
main.java
import java.util.scanner;
public class main
public static void mainString args
Scanner scnr new Scanner
System.in;
String usercaption;
userCaption scnr nextLine ;
Type your code here.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
