Commit 48ed950f authored by jackt's avatar jackt

Complete Part 2.1

parent cb987464
Pipeline #343 failed with stages
......@@ -20,41 +20,42 @@ public class AssessmentPartTwo {
Character.toString(aChar); // converts the char to a string value
Character.toLowerCase(aChar); // converts all inputs to lowercase to make sure they match
switch (String.valueOf(aChar)) { // switch statement to allow for loop to select the correct string and add the corresponding value
case "a": case "A": case "e": case "E": case "i": case "I": case "o": case "O": case "n": case "N":
case "r": case "R": case "t": case "T": case "l": case "L": case "s": case "S": case "u": case "U":
case "a": case "e": case "i": case "o": case "n": case "r": case "t": case "l": case "s": case "u":
total = total + 1;
break;
case "d": case "D": case "g": case "G":
case "d": case "g":
total = total + 2;
break;
case "b": case "B": case "c": case "C": case "m": case "M": case "p": case "P":
case "b": case "c": case "m": case "p":
total = total + 3;
break;
case "f": case "F": case "h": case "H": case "v": case "V": case "w": case "W": case "y": case "Y":
case "f": case "h": case "v": case "w": case "y":
total = total + 4;
break;
case "k":case "K":
case "k":
total = total + 5;
break;
case "j": case "J": case "x": case "X":
case "j": case "x":
total = total + 8;
break;
case "q": case "Q": case "z": case "Z":
case "q": case "z":
total = total + 10;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment