Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
Java Assignment 3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bran.harvey-chadwi
Java Assignment 3
Commits
5bcb98a6
Commit
5bcb98a6
authored
Nov 26, 2018
by
bran.harvey-chadwi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assignment 3 upload
parent
e56f0d16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
AssessmentPartThree.java
src/AssessmentPartThree.java
+29
-3
No files found.
src/AssessmentPartThree.java
View file @
5bcb98a6
...
@@ -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
...
@@ -29,4 +55,4 @@ public class AssessmentPartThree {
...
@@ -29,4 +55,4 @@ public class AssessmentPartThree {
return
"Encryptred message"
;
return
"Encryptred message"
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment