If all three options are selected then option 1 is done first, followed by option 2 and
Question:
If all three options are selected then option 1 is done first, followed by option 2 and then option 3. If only option 1 and 3 are selected then option 1 is done first followed by option 3.
public static String encrypt(String x, int key, int factor) {
String new_x = "";
for (int i = 0; i < x.length(); i++) {
new_x += (char) (x.charAt(i) * factor);
}
return new_x;
}
public static String encrypt(String x, int key, int factor, boolean reverse) {
String new_x = "";
for (int i = 0; i < x.length(); i++) {
new_x += (char) (x.charAt(i) * factor);
}
return new StringBuilder(new_x).reverse().toString();
return new_x;
}
}
public static String decrypt(String y, int key, int factor)" { String x = ""; for (int i = 0; i < y.length(); i++){ char c = (char) (y.charAt(i) / factor - key); x = x + c; } return x;
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr