Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Assignment-01
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
louie.bridges
Assignment-01
Commits
b08b8766
Commit
b08b8766
authored
Jan 07, 2019
by
louie.bridges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
fe4d6264
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
AssessmentPartFour.java
AssessmentPartFour.java
+64
-0
No files found.
AssessmentPartFour.java
0 → 100644
View file @
b08b8766
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Scanner
;
public
class
AssessmentPartFour
{
List
<
String
>
morseCode
=
new
ArrayList
<
String
>();
public
int
loadMorseFromFile
(
String
filename
)
{
return
0
;
}
public
String
translateMorse
()
{
// This is the morseCode ArrayList that contains all of the charactures and digits.
List
<
String
>
morseCode
=
new
ArrayList
<>();
morseCode
.
add
(
"A"
=
"._"
);
morseCode
.
add
(
"B"
=
"-..."
);
morseCode
.
add
(
"C"
=
"_._."
);
morseCode
.
add
(
"D"
=
"_.."
);
morseCode
.
add
(
"E"
=
"."
);
morseCode
.
add
(
"F"
=
".._."
);
morseCode
.
add
(
"G"
=
"__."
);
morseCode
.
add
(
"H"
=
"...."
);
morseCode
.
add
(
"I"
=
".___"
);
morseCode
.
add
(
"J"
=
"_._"
);
morseCode
.
add
(
"K"
=
"._.."
);
morseCode
.
add
(
"L"
=
"__"
);
morseCode
.
add
(
"M"
=
"_."
);
morseCode
.
add
(
"N"
=
"___"
);
morseCode
.
add
(
"O"
=
".___."
);
morseCode
.
add
(
"P"
=
"__._"
);
morseCode
.
add
(
"Q"
=
"._."
);
morseCode
.
add
(
"R"
=
"..."
);
morseCode
.
add
(
"S"
=
"_"
);
morseCode
.
add
(
"T"
=
".._"
);
morseCode
.
add
(
"U"
=
"..._"
);
morseCode
.
add
(
"V"
=
".__"
);
morseCode
.
add
(
"W"
=
"_.._"
);
morseCode
.
add
(
"X"
=
"_.__"
);
morseCode
.
add
(
"Y"
=
"__.."
);
morseCode
.
add
(
"Z"
=
".____"
);
morseCode
.
add
(
"0"
=
"..___"
);
morseCode
.
add
(
"1"
=
"...__"
);
morseCode
.
add
(
"2"
=
"...._"
);
morseCode
.
add
(
"3"
=
"....."
);
morseCode
.
add
(
"4"
=
"_...."
);
morseCode
.
add
(
"5"
=
"__..."
);
morseCode
.
add
(
"6"
=
"___.."
);
morseCode
.
add
(
"7"
=
"___."
);
morseCode
.
add
(
"8"
=
"_____"
);
morseCode
.
add
(
"9"
=
"__..__"
);
morseCode
.
add
(
" "
=
"/"
);
return
""
;
}
}
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