Commit 5bcb98a6 authored by bran.harvey-chadwi's avatar bran.harvey-chadwi

assignment 3 upload

parent e56f0d16
...@@ -17,9 +17,35 @@ public class AssessmentPartThree { ...@@ -17,9 +17,35 @@ public class AssessmentPartThree {
// Lower case characters remain lower case, upper case remain upper case // Lower case characters remain lower case, upper case remain upper case
// Any other characters are returned unchanged // Any other characters are returned unchanged
return 'a'; String lowerbet = "abcdefghijklmnopqrstuvwxyz";
String capitalbet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for (int i = 0; i < lowerbet.length();i++)
{
if (theChar == lowerbet.charAt(i));
{
char newnumber = lowerbet.charAt(theOffset + i);
return newnumber;
}
if (theChar == capitalbet.charAt(i))
{
char newnumber = capitalbet.charAt(theOffset +i);
return newnumber;
}
} }
char newnumber = theChar;
return newnumber;
}
public String encryptedString(String theMessage, int theOffset) public String encryptedString(String theMessage, int theOffset)
{ {
// 06 - encryptedMessage // 06 - encryptedMessage
......
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