diff --git a/Program.cs b/Program.cs index 6b46b8e..4909cb1 100644 --- a/Program.cs +++ b/Program.cs @@ -448,6 +448,23 @@ namespace Exercises_C_Sharp } }; + + //************************ + //******Dictionary******** + //************************ + ExerciseGroup dictionaryElements = new ExerciseGroup() + { + Name = "Schulaufgaben", + ElementList = new List() + { + new ExerciseElement(){Name = "Aufgabe 1", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_1.Start}, + new ExerciseElement(){Name = "Aufgabe 2", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_2.Start}, + new ExerciseElement(){Name = "Aufgabe 3", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_3.Start}, + new ExerciseElement(){Name = "Aufgabe 4", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_4.Start}, + new ExerciseElement(){Name = "Aufgabe 5", Method = Exercises_C_Sharp.XX_Dictionary.Exercise_5.Start} + } + }; + //************************ //****Sortieren******* //************************ @@ -494,6 +511,7 @@ namespace Exercises_C_Sharp filesystemElements, mysqlElements, sortElements, + dictionaryElements, examElements }; diff --git a/XX_Dictionary/Exercise_4.cs b/XX_Dictionary/Exercise_4.cs index b0d6250..4c4ce36 100644 --- a/XX_Dictionary/Exercise_4.cs +++ b/XX_Dictionary/Exercise_4.cs @@ -6,10 +6,10 @@ namespace Exercises_C_Sharp.XX_Dictionary { class Exercise_4 { - //... + //Addieren Sie alle Value-Werte mit geraden Index auf und geben Sie das Ergebnis aus. public static void Start() { - Dictionary dic = new(); + Dictionary dic = new() {{1, 14.85}, {2, 58.52}, {3, 8.63}, {4, 6.49}, {5, 62.85}, {6, 2.22}, {7, 3.33}, {8, 9.99}}; //Code Start diff --git a/XX_Dictionary/Exercise_5.cs b/XX_Dictionary/Exercise_5.cs index 80484fd..a0c49ca 100644 --- a/XX_Dictionary/Exercise_5.cs +++ b/XX_Dictionary/Exercise_5.cs @@ -6,10 +6,10 @@ namespace Exercises_C_Sharp.XX_Dictionary { class Exercise_5 { - //... + //Der User soll hier ein Wort eingeben. Wenn es sich schon im Dictionary befindet, dann soll die Übersetzung ausgegeben werden. Wenn nicht, dass soll der User die Übersetzung eingeben und beide Elemente sollen in dem Dictionary gespeichert werden. Groß- und Kleinschreibung soll keine Rolle spielen. public static void Start() { - Dictionary dic = new(); + Dictionary dic = new(){{"black", "schwarz"}, {"exception", "Ausnahme"}, {"barrel", "Fass"}}; //Code Start diff --git a/XX_Multithreading/Exercise_1.cs b/XX_Multithreading/Exercise_1.cs new file mode 100644 index 0000000..e69de29 diff --git a/XX_Multithreading/Exercise_2.cs b/XX_Multithreading/Exercise_2.cs new file mode 100644 index 0000000..e69de29 diff --git a/XX_Multithreading/Exercise_3.cs b/XX_Multithreading/Exercise_3.cs new file mode 100644 index 0000000..e69de29 diff --git a/XX_Multithreading/Exercise_4.cs b/XX_Multithreading/Exercise_4.cs new file mode 100644 index 0000000..e69de29 diff --git a/XX_Multithreading/Exercise_5.cs b/XX_Multithreading/Exercise_5.cs new file mode 100644 index 0000000..e69de29 diff --git a/XX_Sorting/Excercise_1.cs b/XX_Sorting/Exercise_1.cs similarity index 100% rename from XX_Sorting/Excercise_1.cs rename to XX_Sorting/Exercise_1.cs