Results 1 to 10 of 10
  1. #1
    surfelijo is offline Member
    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0

    Default Albhed Converter from FFX:) help me fix my code please :)

    I'm trying to make a Albhed Converter from FFX. But the Letters wont covert right. Can someone help me?

    The Output: Push 1 to convert English to AlBhed Push 2 to convert AlBhed to English 1 Enter the phase you wish to convet to AlBhed. A A Means... O

    But the letter A should be Y not O, because A' is converted into 'Y' and then 'Y' into 'O' Please Help

    Java Code:
    /**
     * @(#)AlBhedCoverter.java
     *
     * AlBhedCoverter application
     *
     * @author 
     * @version 1.00 2013/7/26
     */
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
     
     
    public class AlBhedCoverter {
     
        public static void main(String[] args) {
     
    		Scanner input = new Scanner(System.in);
        	Scanner keyboard = new Scanner(System.in);
        	AlBhed x = new AlBhed();
        	English y = new English();
     
        	System.out.println("Push 1 to convert English to AlBhed");
        	System.out.println("Push 2 to convert AlBhed to English");
        		int choice1 = keyboard.nextInt();
        		switch (choice1)	{ 
        			case 1: 
        				x.AlBhedCov();
        				break;
     
        			case 2:
        				y.EnglishCov();
        				break;
     
        		}
     
     
        }
    }


    Java Code:
    /**
     * @(#)AlBhed.java
     *
     *
     * @author 
     * @version 1.00 2013/7/26
     */
     
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
    public class AlBhed {
     
        public void AlBhedCov() {
     
        Scanner keyboard = new Scanner(System.in);	
        String letter = " ";	
    	System.out.println("Enter the phase you wish to convet to AlBhed.");
    	letter = keyboard.nextLine();
    	System.out.println(letter + " Means...");
    	String newLetter = letter.replaceAll("A","Y")
                                 .replaceAll("a","y")
                                 .replaceAll("B","P")	
                                 .replaceAll("b","p")
                                 .replaceAll("C","L")	
                                 .replaceAll("c","l")   	                         	
                                 .replaceAll("D","T")	
                                 .replaceAll("d","t")
                                 .replaceAll("E","A")	
                                 .replaceAll("e","a") 
                                 .replaceAll("F","V")
                                 .replaceAll("f","v")	
                                 .replaceAll("G","K")
                                 .replaceAll("g","k")	
                                 .replaceAll("H","R")   	                         	
                                 .replaceAll("h","r")	
                                 .replaceAll("I","E")
                                 .replaceAll("i","e")	
                                 .replaceAll("J","Z")
                                 .replaceAll("j","z")	
                                 .replaceAll("K","G")
                                 .replaceAll("k","g")	
                                 .replaceAll("L","M")   	                         	
                                 .replaceAll("l","m")	
                                 .replaceAll("M","S")
                                 .replaceAll("m","s")	
                                 .replaceAll("N","H")
                                 .replaceAll("n","h")	
                                 .replaceAll("O","U")
                                 .replaceAll("o","u")	
                                 .replaceAll("P","B")   	                         	
                                 .replaceAll("p","b")	
                                 .replaceAll("Q","X")
                                 .replaceAll("q","x")	
                                 .replaceAll("R","N")
                                 .replaceAll("r","n")	
                                 .replaceAll("S","C")
                                 .replaceAll("s","c")	
                                 .replaceAll("T","D")   	                         	
                                 .replaceAll("t","d")	
                                 .replaceAll("U","I")
                                 .replaceAll("u","i")	
                                 .replaceAll("V","J")
                                 .replaceAll("v","j")	
                                 .replaceAll("W","F")
                                 .replaceAll("w","f")	
                                 .replaceAll("X","Q")   	                         	
                                 .replaceAll("x","q")	
                                 .replaceAll("Y","O")
                                 .replaceAll("y","o")
                                 .replaceAll("Z","W")
                                 .replaceAll("z","w");            
     
    		System.out.println(newLetter);
     
        } 
    }


    Java Code:
    /**
     * @(#)English.java
     *
     *
     * @author 
     * @version 1.00 2013/7/26
     */
     
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
    public class English {
     
        public void EnglishCov() {	
        Scanner keyboard = new Scanner(System.in);	
        String letter = " ";	
    	System.out.println("Enter the phase you wish to convet to English.");
    	letter = keyboard.nextLine();
    	System.out.println(letter + " Means...");
        String newLetter = letter.replaceAll("Y","A")
                                 .replaceAll("y","a")
                                 .replaceAll("P","B")	
                                 .replaceAll("p","b")
                                 .replaceAll("L","C")	
                                 .replaceAll("l","c")   	                         	
                                 .replaceAll("T","D")	
                                 .replaceAll("t","d")
                                 .replaceAll("A","E")	
                                 .replaceAll("a","e") 
                                 .replaceAll("V","F")
                                 .replaceAll("v","f")	
                                 .replaceAll("K","G")
                                 .replaceAll("k","g")	
                                 .replaceAll("R","H")   	                         	
                                 .replaceAll("r","h")	
                                 .replaceAll("E","I")
                                 .replaceAll("e","i")	
                                 .replaceAll("Z","J")
                                 .replaceAll("z","J")	
                                 .replaceAll("G","k")
                                 .replaceAll("g","k")	
                                 .replaceAll("M","L")   	                         	
                                 .replaceAll("m","l")	
                                 .replaceAll("S","M")
                                 .replaceAll("s","m")	
                                 .replaceAll("H","N")
                                 .replaceAll("h","n")	
                                 .replaceAll("U","O")
                                 .replaceAll("u","o")	
                                 .replaceAll("B","P")   	                         	
                                 .replaceAll("b","p")	
                                 .replaceAll("X","Q")
                                 .replaceAll("x","q")	
                                 .replaceAll("N","R")
                                 .replaceAll("n","r")	
                                 .replaceAll("C","S")
                                 .replaceAll("c","s")	
                                 .replaceAll("D","T")   	                         	
                                 .replaceAll("d","t")	
                                 .replaceAll("I","U")
                                 .replaceAll("i","u")	
                                 .replaceAll("J","V")
                                 .replaceAll("j","v")	
                                 .replaceAll("F","W")
                                 .replaceAll("f","w")	
                                 .replaceAll("Q","X")   	                         	
                                 .replaceAll("q","X")	
                                 .replaceAll("O","Y")
                                 .replaceAll("o","y")
                                 .replaceAll("W","Z")
                                 .replaceAll("w","z");                                  
     
    		System.out.println(newLetter);
     
        } 
    }

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    You didn't bother to reply to Tolls' queries on your earlier thread. Why should we expect any better behavior this time round?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    What is an 'Albhed converter' and while I'm at it: what is 'FFX'?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Quote Originally Posted by JosAH View Post
    What is an 'Albhed converter' and while I'm at it: what is 'FFX'?
    And here I've been watching this topic waiting for you to show up and enlighten us ...

    db <- maths impaired
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,993
    Rep Power
    5

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Seriously: I think he's talking about the alien language used in the game Final Fantasy 10. Nothing to do with math.

    - Erik (gaming addict)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Quote Originally Posted by gimbal2 View Post
    Seriously: I think he's talking about the alien language used in the game Final Fantasy 10. Nothing to do with math.

    - Erik (gaming addict)
    Oh ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    surfelijo is offline Member
    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    its a game from final fantasy and its a made up language from it.

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,993
    Rep Power
    5

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Yes I already said that. Now you think about why you thought you could assume everyone knew that and not explain yourself properly from the beginning - it will make it so you get actually help in the future when you learn how to ask smart questions.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,993
    Rep Power
    5

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Zombie resurrect: I wonder if this is the same guy. Translation program in JAVA - Stack Overflow

    If so not much progress has been made in a year.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  10. #10
    surfelijo is offline Member
    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0

    Default Re: Albhed Converter from FFX:) help me fix my code please :)

    Quote Originally Posted by gimbal2 View Post
    Zombie resurrect: I wonder if this is the same guy. Translation program in JAVA - Stack Overflow

    If so not much progress has been made in a year.
    Hahahaha No, I finish that project a long long time ago. I forgot about my AlBhedCoverter.
    I think this was my finished version. :)

    Java Code:
    /**
     * @(#)AlBhedCoverter.java
     *
     * AlBhedCoverter application
     *
     * @author 
     * @version 1.00 2013/7/26
     */
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
     
     
    public class AlBhedDeCoder {
        
        public static void main(String[] args) {
    
    		Scanner input = new Scanner(System.in);
        	Scanner keyboard = new Scanner(System.in);
        	AlBhedTranslator x = new AlBhedTranslator();
        	EnglishTranslator y = new EnglishTranslator();
    		
        	System.out.println("Push 1 to convert AlBhed to English");
        	System.out.println("Push 2 to convert English to AlBhed");
        		int choice1 = keyboard.nextInt();
        		switch (choice1)	{ 
        			case 1: 
        				y.EnglishCov();
        				break;
        				
        			case 2:
        				x.AlBhedCov();
        				break;
        		
        		}
        		
        	
        }
    }
    Java Code:
    /**
     * @(#)AlBhed.java
     *
     *
     * @author 
     * @version 1.00 2013/7/26
     */
    
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
    public class AlBhedTranslator {
    	
        public void AlBhedCov() {
        		
        Scanner keyboard = new Scanner(System.in);	
        String letter = "";
        String altLetter = "";	
    	System.out.println("Enter the phase you wish to convet to AlBhed.");
    	letter = keyboard.nextLine();
    
    	char [] trans = letter.toCharArray();
    	
    	for (int i = 0; i < trans.length; i++)
    	{
    	     if(trans[i] == 'A')
    	        altLetter += 'Y';
    	    else if(trans[i] == 'a')
    	        altLetter += 'y';
    	    else if(trans[i] == 'B')
    	        altLetter += 'P';
    	    else if(trans[i] == 'b')
    	        altLetter += 'p';
    	    else if(trans[i] == 'C')
    	        altLetter += 'L';
    	    else if(trans[i] == 'c')
    	        altLetter += 'l';
    	    else if(trans[i] == 'D')
    	        altLetter += 'T';
    	    else if(trans[i] == 'd')
    	        altLetter += 't';
    	    else if(trans[i] == 'E')
    	        altLetter += 'A';
    	    else if(trans[i] == 'e')
    	        altLetter += 'a';
    	    else if(trans[i] == 'F')
    	        altLetter += 'v';
    	    else if(trans[i] == 'f')
    	        altLetter += 'v';
    	    else if(trans[i] == 'G')
    	        altLetter += 'K';
    	    else if(trans[i] == 'g')
    	        altLetter += 'k';
    	    else if(trans[i] == 'H')
    	        altLetter += 'R';
    	    else if(trans[i] == 'h')
    	        altLetter += 'r';
    	    else if(trans[i] == 'I')
    	        altLetter += 'E';
    	    else if(trans[i] == 'i')
    	        altLetter += 'e';
    	    else if(trans[i] == 'J')
    	        altLetter += 'Z';
    	    else if(trans[i] == 'j')
    	        altLetter += 'z';
    	    else if(trans[i] == 'K')
    	        altLetter += 'G';
    	    else if(trans[i] == 'k')
    	        altLetter += 'g';
    	    else if(trans[i] == 'L')
    	        altLetter += 'M';
    	    else if(trans[i] == 'l')
    	        altLetter += 'm'; 
    	    else if(trans[i] == 'M')
    	        altLetter += 'S';
    	    else if(trans[i] == 'm')
    	        altLetter += 's';
    	    else if(trans[i] == 'N')
    	        altLetter += 'H';
    	    else if(trans[i] == 'n')
    	        altLetter += 'h';
    	    else if(trans[i] == 'O')
    	        altLetter += 'U';
    	    else if(trans[i] == 'o')
    	        altLetter += 'u';
    	    else if(trans[i] == 'P')
    	        altLetter += 'B';
    	    else if(trans[i] == 'p')
    	        altLetter += 'b';
    	    else if(trans[i] == 'Q')
    	        altLetter += 'X';
    	    else if(trans[i] == 'q')
    	        altLetter += 'x';
    	    else if(trans[i] == 'R')
    	        altLetter += 'N';
    	    else if(trans[i] == 'r')
    	        altLetter += 'n';
    	    else if(trans[i] == 'S')
    	        altLetter += 'C';
    	    else if(trans[i] == 's')
    	        altLetter += 'c';
    	    else if(trans[i] == 'T')
    	        altLetter += 'D';
    	    else if(trans[i] == 't')
    	        altLetter += 'd';
    	    else if(trans[i] == 'U')
    	        altLetter += 'I';
    	    else if(trans[i] == 'u')
    	        altLetter += 'i';
    	    else if(trans[i] == 'V')
    	        altLetter += 'J';
    	    else if(trans[i] == 'v')
    	        altLetter += 'j';
    	    else if(trans[i] == 'W')
    	        altLetter += 'F';
    	    else if(trans[i] == 'w')
    	        altLetter += 'f';
    	    else if(trans[i] == 'X')
    	        altLetter += 'Q';
    	    else if(trans[i] == 'x')
    	        altLetter += 'q';	        
    	    else if(trans[i] == 'Y')
    	        altLetter += 'O';
    	    else if(trans[i] == 'y')
    	        altLetter += 'o';
    	    else if(trans[i] == 'Z')
    	        altLetter += 'W';
    	    else if(trans[i] == 'z')
    	        altLetter += 'w';	     
    	    else if(trans[i] == ' ')
    	        altLetter += ' ';   
    	    else if(trans[i] == '?')
    	        altLetter += '?';	        
    	    else if(trans[i] == '!')
    	        altLetter += '!';
    	    else if(trans[i] == ',')
    	        altLetter += ',';
    	    else if(trans[i] == ':')
    	        altLetter += ':';
    	    else if(trans[i] == '"')
    	        altLetter += '"';	     
    	    else if(trans[i] == ';')
    	        altLetter += ';';   	        	     	        	   	        	        	        	        	        	              	        	        	        
    	}
    
    	System.out.println("Translated means:" + altLetter);
    	
        } 
    }
    Java Code:
    /**
     * @(#)English.java
     *
     *
     * @author 
     * @version 1.00 2013/7/26
     */
    
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.util.Scanner;
    public class EnglishTranslator {
    	
        public void EnglishCov() {	
        	
        Scanner keyboard = new Scanner(System.in);	
        String letter = "";
        String altLetter = "";	
    	System.out.println("Enter the phase you wish to convet to AlBhed.");
    	letter = keyboard.nextLine();
    
    	char [] trans = letter.toCharArray();
    	
    	for (int i = 0; i < trans.length; i++)
    	{
    	     if(trans[i] == 'Y')
    	        altLetter += 'A';
    	    else if(trans[i] == 'y')
    	        altLetter += 'a';
    	    else if(trans[i] == 'P')
    	        altLetter += 'B';
    	    else if(trans[i] == 'p')
    	        altLetter += 'b';
    	    else if(trans[i] == 'L')
    	        altLetter += 'C';
    	    else if(trans[i] == 'l')
    	        altLetter += 'c';
    	    else if(trans[i] == 'T')
    	        altLetter += 'D';
    	    else if(trans[i] == 't')
    	        altLetter += 'd';
    	    else if(trans[i] == 'A')
    	        altLetter += 'E';
    	    else if(trans[i] == 'a')
    	        altLetter += 'e';
    	    else if(trans[i] == 'V')
    	        altLetter += 'F';
    	    else if(trans[i] == 'v')
    	        altLetter += 'f';
    	    else if(trans[i] == 'K')
    	        altLetter += 'G';
    	    else if(trans[i] == 'k')
    	        altLetter += 'g';
    	    else if(trans[i] == 'R')
    	        altLetter += 'H';
    	    else if(trans[i] == 'r')
    	        altLetter += 'h';
    	    else if(trans[i] == 'E')
    	        altLetter += 'I';
    	    else if(trans[i] == 'e')
    	        altLetter += 'i';
    	    else if(trans[i] == 'Z')
    	        altLetter += 'J';
    	    else if(trans[i] == 'z')
    	        altLetter += 'j';
    	    else if(trans[i] == 'G')
    	        altLetter += 'K';
    	    else if(trans[i] == 'g')
    	        altLetter += 'k';
    	    else if(trans[i] == 'M')
    	        altLetter += 'L';
    	    else if(trans[i] == 'm')
    	        altLetter += 'l'; 
    	    else if(trans[i] == 'S')
    	        altLetter += 'M';
    	    else if(trans[i] == 's')
    	        altLetter += 'm';
    	    else if(trans[i] == 'H')
    	        altLetter += 'N';
    	    else if(trans[i] == 'h')
    	        altLetter += 'n';
    	    else if(trans[i] == 'U')
    	        altLetter += 'O';
    	    else if(trans[i] == 'u')
    	        altLetter += 'o';
    	    else if(trans[i] == 'B')
    	        altLetter += 'P';
    	    else if(trans[i] == 'b')
    	        altLetter += 'p';
    	    else if(trans[i] == 'X')
    	        altLetter += 'Q';
    	    else if(trans[i] == 'x')
    	        altLetter += 'q';
    	    else if(trans[i] == 'N')
    	        altLetter += 'R';
    	    else if(trans[i] == 'n')
    	        altLetter += 'r';
    	    else if(trans[i] == 'C')
    	        altLetter += 'S';
    	    else if(trans[i] == 'c')
    	        altLetter += 's';
    	    else if(trans[i] == 'D')
    	        altLetter += 'T';
    	    else if(trans[i] == 'd')
    	        altLetter += 't';
    	    else if(trans[i] == 'I')
    	        altLetter += 'U';
    	    else if(trans[i] == 'i')
    	        altLetter += 'u';
    	    else if(trans[i] == 'J')
    	        altLetter += 'V';
    	    else if(trans[i] == 'j')
    	        altLetter += 'v';
    	    else if(trans[i] == 'F')
    	        altLetter += 'W';
    	    else if(trans[i] == 'f')
    	        altLetter += 'w';
    	    else if(trans[i] == 'Q')
    	        altLetter += 'X';
    	    else if(trans[i] == 'q')
    	        altLetter += 'x';	        
    	    else if(trans[i] == 'O')
    	        altLetter += 'Y';
    	    else if(trans[i] == 'y')
    	        altLetter += 'o';
    	    else if(trans[i] == 'W')
    	        altLetter += 'Z';
    	    else if(trans[i] == 'w')
    	        altLetter += 'z';	     
    	    else if(trans[i] == ' ')
    	        altLetter += ' ';
    	    else if(trans[i] == '?')
    	        altLetter += '?';	        
    	    else if(trans[i] == '!')
    	        altLetter += '!';
    	    else if(trans[i] == ',')
    	        altLetter += ',';
    	    else if(trans[i] == ':')
    	        altLetter += ':';
    	    else if(trans[i] == '"')
    	        altLetter += '"';	     
    	    else if(trans[i] == ';')
    	        altLetter += ';';   	                	        	   	        	        	        	        	        	              	        	        	        
    	}
    
    	System.out.println("Translated means:" + altLetter);
    	
        } 
    }

Similar Threads

  1. Corn Converter 0.1
    By java software in forum Java Software
    Replies: 0
    Last Post: 06-16-2013, 07:38 AM
  2. converter
    By fasooly1992 in forum New To Java
    Replies: 2
    Last Post: 12-25-2012, 08:54 PM
  3. Replies: 0
    Last Post: 11-05-2011, 06:16 AM
  4. I need some help with converter GUI
    By linux1man in forum AWT / Swing
    Replies: 5
    Last Post: 07-29-2009, 11:57 PM
  5. YaHP Converter 1.2.15
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-19-2007, 05:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •