public final class BadEncryption {
    public static String encryptString(String str) {     
        char[] chars = str.toCharArray();
        char aux;
        for(int i=0; i+1 < chars.length; i+=2) {
            aux = chars[i];
            chars[i] = chars[i+1];
            chars[i+1] = aux;
        }
        return String.valueOf(chars);
    }
    public static String decryptString(String str) {     
        char[] chars = str.toCharArray();
        char aux;
        for(int i=0; i+1 < chars.length; i+=2) {
            aux = chars[i];
            chars[i] = chars[i+1];
            chars[i+1] = aux;
        }
        return String.valueOf(chars);
    }
    public static int encryptInt(int n) {     
        return n+3;
    }
    public static int decryptInt(int n) {     
        return n-3;
    }
    public static double encryptDouble(double n) {     
        return n+2.5;
    }
    public static double decryptDouble(double n) {     
        return n-2.5;
    }
    public static void main(String[] args) {
        String s1 = "Hola", s2, s3;
        int n1 = 7, n2, n3;
        double d1 = 9.8, d2, d3;
        System.out.println(s1 + ":" + n1 + ":" + d1);
        System.out.println("Encrypt");
        s2 = BadEncryption.encryptString(s1);
        n2 = BadEncryption.encryptInt(n1);
        d2 = BadEncryption.encryptDouble(d1);
        System.out.println(s2 + ":" + n2 + ":" + d2);
        System.out.println("Decrypt");
        s3 = BadEncryption.decryptString(s2);
        n3 = BadEncryption.decryptInt(n2);
        d3 = BadEncryption.decryptDouble(d2);
        System.out.println(s3 + ":" + n3 + ":" + d3);
    }
}
