Question: Please complete this in java only and by reading from a text file PROBLEM: Given 2 strings with all capital letters, eliminate characters using each

Please complete this in java only and by reading from a text file  Please complete this in java only and by reading from a
text file PROBLEM: Given 2 strings with all capital letters, eliminate characters
using each of the rules below once until only different characters align.
The rules are performed in the following order: Delete the second occurance

PROBLEM: Given 2 strings with all capital letters, eliminate characters using each of the rules below once until only different characters align. The rules are performed in the following order: Delete the second occurance of any double consonant. There will not be more than 2 of the same consonant together. Delete all vowels (A, E, I, O, U) unless the vowel is the first character in the string. Align the resulting strings from left to right. Then delete all like characters at like positions. Align the remaining characters from right to left. Then delete like characters at like positions starting from the end of the string. Example: MISSISSIPPI MISSOURI After removing the double consonants: MISISIPI MISOURI After removing the vowels: MSSP MSR After removing letters from L to R in same location: SP After removing letters from R to L in the same location (no changes): Output: R INPUT: There will be 5 inputs. Each input will contain 2 strings separated by a single space and each fewer than 80 characters. OUTPUT: For each input, print the shorter of the two resulting strings or the first in alphabetical order if they have the same length. We guarantee that neither is an empty string, SAMPLE INPUT SAMPLE OUTPUT: http://www.datafiles.acsl.org/2020/contest2/jr-sample-input.txt MISSISSIPPI MISSOURI CATHERINE KATHERYNE CONSTITUTIONAL CONVENTIONAL COMPARTMENTALIZATION SEMIAUTOBIOGRAPHICAL PHYSICIAN PHARMACY 1. R 2.C 3. VN 4. SBGRPHCL 5. RMY TEST DATA TEST INPUT: FEEFI FOFUM FIDDLEDEEDEE MYLOLLIPOPS MYLARBALLOONS CONNECTICUTCT CONSTITUTIONSTATE MASSACHUSETTSBAYCOLONY MINUTEMANNATIONALHISTORICAL PARK AMERICANCOMPUTERSCIENCELEAGUE NATIONALACADEMICGAMESLEAGUE TEST OUTPUT: 1. DLDD 2. LPP 3. CCC 4. SCSBYCLNY 5. NTNLCDGM FEEFIFOFUM FIDDLEDEEDEE MYLOLLIPOPS MYLARBALLOONS CONNECTICUTCT CONSTITUTIONSTATE MASSACHUSETTSBAYCOLONY MINUTEMANNATIONALHISTORICALPARK AMERICANCOMPUTERSCIENCELEAGUE NATIONALACADEMICGAMESLEAGUE MISSISSIPPI MISSOURI CATHERINE KATHERYNE CONSTITUTIONAL CONVENTIONAL COMPARTMENTALIZATION SEMIAUTOBIOGRAPHICAL PHYSICIAN PHARMACY

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