Skip to content
Snippets Groups Projects
Commit 552f3a1e authored by Dennis Eisold's avatar Dennis Eisold
Browse files

Klasse für Morsecodes angelegt

parent bf348db1
No related branches found
No related tags found
No related merge requests found
package Projektarbeit.model;
import java.util.TreeMap;
public class Morsecode {
TreeMap<String, String> codeMap = new TreeMap<>();
/**
* Im Konstruktor werden alle Notwendigen Zeichen und deren zugehöriger Codes, der Treemap hinzugefügt.
*/
public Morsecode() {
codeMap.put("A", "10110");
codeMap.put("B", "110101010");
codeMap.put("C", "1101011010");
codeMap.put("D", "1101010");
codeMap.put("E", "10");
codeMap.put("F", "101011010");
codeMap.put("G", "11011010");
codeMap.put("H", "10101010");
codeMap.put("I", "1010");
codeMap.put("J", "10110110110");
codeMap.put("K", "11010110");
codeMap.put("L", "101101010");
codeMap.put("M", "110110");
codeMap.put("N", "11010");
codeMap.put("O", "110110110");
codeMap.put("P", "1011011010");
codeMap.put("Q", "11011010110");
codeMap.put("R", "1011010");
codeMap.put("S", "101010");
codeMap.put("T", "110");
codeMap.put("U", "1010110");
codeMap.put("V", "101010110");
codeMap.put("W", "10110110");
codeMap.put("X", "1101010110");
codeMap.put("Y", "11010110110");
codeMap.put("Z", "1101101010");
codeMap.put("1", "10110110110110");
codeMap.put("2", "1010110110110");
codeMap.put("3", "101010110110");
codeMap.put("4", "10101010110");
codeMap.put("5", "1010101010");
codeMap.put("6", "11010101010");
codeMap.put("7", "110110101010");
codeMap.put("8", "1101101101010");
codeMap.put("9", "11011011011010");
codeMap.put("0", "110110110110110");
codeMap.put("KA", "1101011010110");
codeMap.put("AR", "101101011010");
codeMap.put("VE", "10101011010");
codeMap.put("SK", "10101011010110");
}
public void getCode(char sign) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment