Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Ash Brett Assessment part 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
ash.brett
Ash Brett Assessment part 3
Commits
bf8c638f
Commit
bf8c638f
authored
Jan 08, 2019
by
ash.brett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update AssessmentPartThree.java
parent
627199bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
AssessmentPartThree.java
src/AssessmentPartThree.java
+7
-2
No files found.
src/AssessmentPartThree.java
View file @
bf8c638f
...
...
@@ -21,8 +21,13 @@ public class AssessmentPartThree {
StringBuilder
encoded
=
new
StringBuilder
();
//This section of the code creates a new string which is equal the value of theChar
String
letter
=
String
.
valueOf
(
theChar
);
//this sets the int theOffset to be equal to theOffset divided by 26 plus 26
theOffset
=
theOffset
%
26
+
26
;
if
(
theOffset
>
26
){
theOffset
=
theOffset
%
26
;
}
else
if
(
theOffset
<
0
)
{
theOffset
=
(
theOffset
%
26
)+
26
;
}
//This section of the code creates a char called i and converts the string Letter to an array of characters
//i is the selected character of the array
for
(
char
i
:
letter
.
toCharArray
())
{
...
...
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