/*
 * PigLatinApp.java      Author: Koffman and Wolz
 * Generates the pig Latin form of a word
 */
 
import javax.swing.JOptionPane;

public class PigLatinApp {

  public static void main(String[] args) {
     // Get a word to translate to pig Latin
     String word = JOptionPane.showInputDialog(
                     "Enter a word starting with a consonant");

     // Store the word and its pig Latin form in a message string
     String message = word + " is " +
              word.substring(1) + word.charAt(0) + "ay" +
              " in pig Latin";

     // Display the message string
     JOptionPane.showMessageDialog(null, message);
  }
}

