/*** Pig Latin translator** @Zac Register* @Halloweenie*/import java.util.Scanner;public class CH5PP1 {public static void main(String[] args) {Scanner something = new Scanner(System.in);System.out.print("Are you trying to translate an entire sentence (type'yes' or 'no')");String test = something.next();while (test.equals("yes")){Scanner piggy = new Scanner(System.in);String word;String translation = "";char first;boolean cap = false;String line;System.out.print("enter a line you want to translate: ");line = piggy.nextLine();piggy = new Scanner(line);while (piggy.hasNext()) {word = piggy.next();first = word.charAt(0);
You've reached the end of your free preview.
Want to read the whole page?
Winter '16
Fontaine, M
Science,Metaphrase,literal translation,public class CH5PP1