Commit b08b8766 authored by louie.bridges's avatar louie.bridges

Upload New File

parent fe4d6264
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 "";
}
}
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