Question: LANGUAGE IS JAVA. NEED CODE TO OUTPUT EXACTLY AS what Expected Output displays. not Your output. show on compiler if possible. will like and rate

LANGUAGE IS JAVA. NEED CODE TO OUTPUT EXACTLY AS what "Expected Output" displays. not "Your output". show on compiler if possible. will like and rate answer if correct.
Objective Using the string manipulation skills gained in the previous labs, you will create a modularized program that translates a phrase into Pig Latin by using methods to break up the task. Task Rules of Translation: If the word begins with a consonant, take the beginning consonants up until the first vowel and move them to the end of the word. Then append ay at the very end. (so cricket would become icketcray) If the word begins with a vowel, simply add ay to the end. (apple would become appleay) ify is the first letter in the word, treat it as a consonant, otherwise it is used as a vowel young would become oungay and system would become ystemsay) Assume all input is lowercase and alphabetical (so don't worry about checking for casingumbers/symbols) The main method should have as few lines code as possible, and the template has suggested method headers. Feel free to rename variables and methods in a way that makes sense for you, but keep the general format
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
