This is not a duplicate of "Writing a Java program that converts an English word into Pig Latin". I have checked that and it doesn't help...
The difference between my problem and the other questions/answers here on stack overflow is the fact that I have to have a specific program that returns the Pig Latin to the compiler that grades me if I'm correct or not. Even using the other questions, the compiler doesn't accept the code even when altered. The code just needs to be more specific in how it executes the code. I am new to java, and I still don't quite understand everything that is going on.
I need to convert any input given to Pig Latin.I have looked at the other questions on converting to pig latin on this site, but they still don't help me. Here is the problem...
Your job is to translate English input to Pig Latin output. For this exercise, keep capitalized letters capitalized, even when they are moved.
ID: piglatin1
Input: A sentence in English.
Output: The translation in Pig Latin.
The code I have (It isn't much because I don't really know where to start):
import java.util.Scanner;
public class program /* needs to be named this for compiler */
{
public static void main(String[] args)
{
Scanner pig = new Scanner(System.in);
String word = piglatin1;
};
};
How would I do this?