Commit dc7a5a14 authored by jackt's avatar jackt

Final

parent 615a4fa7
...@@ -100,8 +100,8 @@ public class AssessmentPartThree { ...@@ -100,8 +100,8 @@ public class AssessmentPartThree {
continue; continue;
} }
if ((theOffset < 0 && !(ascii < 65 - theOffset && ascii >= 65) if ((theOffset < 0 && !(ascii < 65 - theOffset && ascii >= 65) //for each if statement, if the character falls between the range, then the offset value is subtracted
|| (theOffset < 0 && !(ascii < 97 - theOffset && ascii >= 97)))) { || (theOffset < 0 && !(ascii < 97 - theOffset && ascii >= 97)))) { // inclusive to a wrap around (this goes for the following 4 if statements)
offsetVal = ascii + theOffset; offsetVal = ascii + theOffset;
theChar = (char) offsetVal; theChar = (char) offsetVal;
message = message + theChar; message = message + theChar;
...@@ -128,11 +128,11 @@ public class AssessmentPartThree { ...@@ -128,11 +128,11 @@ public class AssessmentPartThree {
message = message + theChar; message = message + theChar;
continue; continue;
} }
theMessage = message; theMessage = message; //sets the string to message (answer format)
} }
} }
return message; return message; //returns the answer
} }
{ {
......
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