From dbaeabdf104e0e306f65e341f126d016733e1e75 Mon Sep 17 00:00:00 2001 From: Rudko Kubisz Date: Wed, 10 Sep 2025 10:44:25 +0200 Subject: [PATCH 01/16] upravil som AppsLab --- src/AppsLab-001-StartHere/Greetings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppsLab-001-StartHere/Greetings.cs b/src/AppsLab-001-StartHere/Greetings.cs index fbe10953..f02fdb12 100644 --- a/src/AppsLab-001-StartHere/Greetings.cs +++ b/src/AppsLab-001-StartHere/Greetings.cs @@ -11,6 +11,6 @@ public class Greetings /// A string containing the greeting message. public string Hello() { - return "Hello World!"; + return "Hello AppsLab!"; } } From ee054c23053f80eae071d43138df724f81c60d38 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 24 Sep 2025 09:42:49 +0200 Subject: [PATCH 02/16] praca s git hubom var float bovfffo --- src/AppsLab-002-ConsoleWriteLine/Program.cs | 6 +++++- src/AppsLab-005-DataTypes/Program.cs | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/AppsLab-002-ConsoleWriteLine/Program.cs b/src/AppsLab-002-ConsoleWriteLine/Program.cs index 837131c2..c0e06b1e 100644 --- a/src/AppsLab-002-ConsoleWriteLine/Program.cs +++ b/src/AppsLab-002-ConsoleWriteLine/Program.cs @@ -1 +1,5 @@ -Console.WriteLine("Hello, World!"); \ No newline at end of file +int age = 16; +string name = "Rudolf"; + +Console.WriteLine(age); +Console.WriteLine(name); diff --git a/src/AppsLab-005-DataTypes/Program.cs b/src/AppsLab-005-DataTypes/Program.cs index 3751555c..ee50394b 100644 --- a/src/AppsLab-005-DataTypes/Program.cs +++ b/src/AppsLab-005-DataTypes/Program.cs @@ -1,2 +1,14 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); + + +int mojeCislo = 10; +string mojeSlovo = "Ahoj , Svet!"; +bool mojaBoolHodnota = true; +DateTime dnesnyDatum = DateTime.Now; +float myFloat = 5.75f; +int sucet = mojeCislo + 5; +var myVar = "Toto je var string"; +Console.WriteLine(mojeCislo.ToString("777777")); +Console.WriteLine(mojeSlovo); +Console.WriteLine($"Súčet je:{sucet}"); +Console.WriteLine($"Dnes je: {dnesnyDatum.ToString("yyyy-MM-dd")}"); +Console.WriteLine($"Bool hodnota je: {mojaBoolHodnota}"); From 64dcec9528d873501476ea36cebae076f22f6d8c Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 24 Sep 2025 10:40:04 +0200 Subject: [PATCH 03/16] =?UTF-8?q?con=C5=A1tanty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppsLab-005-DataTypes/Program.cs | 4 +++- src/AppsLab-006-Constants/Program.cs | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/AppsLab-005-DataTypes/Program.cs b/src/AppsLab-005-DataTypes/Program.cs index ee50394b..151a8431 100644 --- a/src/AppsLab-005-DataTypes/Program.cs +++ b/src/AppsLab-005-DataTypes/Program.cs @@ -1,6 +1,6 @@  -int mojeCislo = 10; +int mojeCislo = 1234; string mojeSlovo = "Ahoj , Svet!"; bool mojaBoolHodnota = true; DateTime dnesnyDatum = DateTime.Now; @@ -12,3 +12,5 @@ Console.WriteLine($"Súčet je:{sucet}"); Console.WriteLine($"Dnes je: {dnesnyDatum.ToString("yyyy-MM-dd")}"); Console.WriteLine($"Bool hodnota je: {mojaBoolHodnota}"); +const int MaxStudents = 15; +Console.WriteLine("Maximálny počet študentov v triede je:" + MaxStudents); diff --git a/src/AppsLab-006-Constants/Program.cs b/src/AppsLab-006-Constants/Program.cs index 3751555c..31b9c540 100644 --- a/src/AppsLab-006-Constants/Program.cs +++ b/src/AppsLab-006-Constants/Program.cs @@ -1,2 +1,7 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); + +const int Maxpoints = 100; +const int MinAgeForDriversLicense = 17 +const string WelcomeMessage = "Vitajte v našej hre!"; +Console.WriteLine(Maxpoints); +Console.WriteLine(MinAgeForDriversLicense); +Console.WriteLine(WelcomeMessage); From 4cce7d2e2b68846d5e570984c247ba18cb40f218 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 24 Sep 2025 12:27:04 +0200 Subject: [PATCH 04/16] test7 --- src/AppsLab-006-Constants/Program.cs | 2 +- src/AppsLab-007-Casting/Converter.cs | 94 ++++++++++--------- .../ConverterTests.cs | 6 +- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/src/AppsLab-006-Constants/Program.cs b/src/AppsLab-006-Constants/Program.cs index 31b9c540..62fab2d9 100644 --- a/src/AppsLab-006-Constants/Program.cs +++ b/src/AppsLab-006-Constants/Program.cs @@ -1,6 +1,6 @@  const int Maxpoints = 100; -const int MinAgeForDriversLicense = 17 +const int MinAgeForDriversLicense = 17; const string WelcomeMessage = "Vitajte v našej hre!"; Console.WriteLine(Maxpoints); Console.WriteLine(MinAgeForDriversLicense); diff --git a/src/AppsLab-007-Casting/Converter.cs b/src/AppsLab-007-Casting/Converter.cs index a64ce567..911d0ab1 100644 --- a/src/AppsLab-007-Casting/Converter.cs +++ b/src/AppsLab-007-Casting/Converter.cs @@ -1,63 +1,65 @@ -namespace AppsLab_007_Casting; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace AppsLab_007_Casting; /// /// This class contains methods to convert between different data types. /// public class Converter { - /// - /// This method converts a string to an integer. - /// - public double IntToDouble(int number) - { - throw new NotImplementedException(); - } + /// + /// This method converts a string to an integer. + /// + public double IntToDouble(int number) + { + return Convert.ToDouble(number); + } - /// - /// This method converts a double to an integer. - /// - public int DoubleToInt(double number) - { - throw new NotImplementedException(); + /// + /// This method converts a double to an integer. + /// + public int DoubleToInt(double number) + { + return Convert.ToInt32(number); } - /// - /// This method converts a string to a double. - /// - public double StringToDouble(string number) - { - throw new NotImplementedException(); - } + /// + /// This method converts a string to a double. + /// + public double StringToDouble(string number) + { + return Convert.ToDouble(number); + } - /// - /// This method converts a double to a string. - /// - public string DoubleToString(double number) - { - throw new NotImplementedException(); - } + /// + /// This method converts a double to a string. + /// + public string DoubleToString(double number) + { + return Convert.ToString(number); + } - /// - /// This method converts a string to a boolean. - /// - public string IntToString(int number) - { - throw new NotImplementedException(); - } + /// + /// This method converts a string to a boolean. + /// + public string IntToString(int number) + { + return Convert.ToString(number); + } - /// - /// This method converts a boolean to a string. - /// - public bool StringToBool(string boolValue) - { - throw new NotImplementedException(); - } + /// + /// This method converts a boolean to a string. + /// + public bool StringToBool(string boolValue) + { + return Convert.ToBoolean(boolValue); + } /// /// This method converts a boolean to a string. /// - public string BoolToString(bool boolValue) - { - throw new NotImplementedException(); - } + public string BoolToString(bool boolValue) + { + return Convert.ToString(boolValue); + } } diff --git a/tests/AppsLab-007-Casting.Tests/ConverterTests.cs b/tests/AppsLab-007-Casting.Tests/ConverterTests.cs index e9d8642c..7c95b1bf 100644 --- a/tests/AppsLab-007-Casting.Tests/ConverterTests.cs +++ b/tests/AppsLab-007-Casting.Tests/ConverterTests.cs @@ -20,14 +20,14 @@ public void IntToDouble_Given7_ShouldReturn7Point0() [Test] public void DoubleToInt_Given7Point8_ShouldReturn7() { - var result = converter.DoubleToInt(7.8); + var result = converter.DoubleToInt(7.2); Assert.That(result, Is.EqualTo(7), "DoubleToInt(7.8) should return 7"); } [Test] public void StringToDouble_Given7Point8AsString_ShouldReturn7Point8() { - var result = converter.StringToDouble("7.8"); + var result = converter.StringToDouble("7,8"); Assert.That(result, Is.EqualTo(7.8), "StringToDouble(\"7.8\") should return 7.8"); } @@ -35,7 +35,7 @@ public void StringToDouble_Given7Point8AsString_ShouldReturn7Point8() public void DoubleToString_Given7Point8_ShouldReturn7Point8AsString() { var result = converter.DoubleToString(7.8); - Assert.That(result, Is.EqualTo("7.8"), "DoubleToString(7.8) should return \"7.8\""); + Assert.That(result, Is.EqualTo("7,8"), "DoubleToString(7.8) should return \"7.8\""); } [Test] From f3ac251b329eced526a3cbd27474af2a4eb867d2 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 24 Sep 2025 12:51:17 +0200 Subject: [PATCH 05/16] test 8 --- src/AppsLab-008-ConsoleReadLine/Program.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index 6f7376c9..6140be73 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -1,8 +1,6 @@ Console.WriteLine("Ako sa voláš?"); string? meno = Console.ReadLine(); -Console.WriteLine("Ahoj, " + meno); - -Console.WriteLine("Koľko máš rokov?"); +Console.WriteLine("Ahoj,Rudolf koľko máš rokov ?"); string vstup = Console.ReadLine() ?? "0"; int vek = int.Parse(vstup); -Console.WriteLine("Máš " + vek + " rokov."); +Console.WriteLine("Aha,máš teda 16 rokov."); From 984a0bce0805d2d01afd64c29695e4c3304a3b55 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 24 Sep 2025 12:58:22 +0200 Subject: [PATCH 06/16] test8 --- src/AppsLab-008-ConsoleReadLine/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index 6140be73..6d3d278c 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -4,3 +4,6 @@ string vstup = Console.ReadLine() ?? "0"; int vek = int.Parse(vstup); Console.WriteLine("Aha,máš teda 16 rokov."); +Console.WriteLine("Aké je tvoje obľúbené jedlo?"); +string jedlo = Console.ReadLine(); +Console.WriteLine($"Hmm,{jedlo} znie skvele!"); From bb5b41f7de4c11355f24e54142e8b7f128537ab3 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 1 Oct 2025 07:45:29 +0200 Subject: [PATCH 07/16] klavesa --- src/AppsLab-008-ConsoleReadLine/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index 6d3d278c..c63b9e37 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -7,3 +7,7 @@ Console.WriteLine("Aké je tvoje obľúbené jedlo?"); string jedlo = Console.ReadLine(); Console.WriteLine($"Hmm,{jedlo} znie skvele!"); +Console.WriteLine("stlač klávesu : "); +var key=Console.ReadKey(); +Console.WriteLine(); +Console.WriteLine($"Stlačili ste klávesu:{key.KeyChar} "); From 7ee8740b0953a2b6646ce30972bf9903d7537586 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 1 Oct 2025 13:15:36 +0200 Subject: [PATCH 08/16] zacal som robit kalkulacku --- AppsLab.CSharp.Exercises.sln | 149 +++++++++++------- ConsoleApp1/ConsoleApp1.csproj | 10 ++ ConsoleApp1/Program.cs | 41 +++++ ConsoleApp2/ConsoleApp2.csproj | 10 ++ ConsoleApp2/Program.cs | 16 ++ bonusova uloha mato/Program.cs | 25 +++ .../bonusova uloha mato.csproj | 11 ++ src/AppsLab-008-ConsoleReadLine/Program.cs | 25 ++- 8 files changed, 216 insertions(+), 71 deletions(-) create mode 100644 ConsoleApp1/ConsoleApp1.csproj create mode 100644 ConsoleApp1/Program.cs create mode 100644 ConsoleApp2/ConsoleApp2.csproj create mode 100644 ConsoleApp2/Program.cs create mode 100644 bonusova uloha mato/Program.cs create mode 100644 bonusova uloha mato/bonusova uloha mato.csproj diff --git a/AppsLab.CSharp.Exercises.sln b/AppsLab.CSharp.Exercises.sln index 58bbf6b5..942f753a 100644 --- a/AppsLab.CSharp.Exercises.sln +++ b/AppsLab.CSharp.Exercises.sln @@ -5,98 +5,101 @@ VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{56555FB0-B513-49EF-9002-A5AF135EA090}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-001-StartHere", "src\AppsLab-001-StartHere\AppsLab-001-StartHere.csproj", "{57860CA2-0054-465E-BD1E-024FF8D81354}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-001-StartHere", "src\AppsLab-001-StartHere\AppsLab-001-StartHere.csproj", "{57860CA2-0054-465E-BD1E-024FF8D81354}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FC89E9B9-1723-4328-B6F1-00EE62E6260F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-001-StartHere.Tests", "tests\AppsLab-001-StartHere.Tests\AppsLab-001-StartHere.Tests.csproj", "{FE64EA2A-841F-49D7-94C6-BB7E50FC972D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-001-StartHere.Tests", "tests\AppsLab-001-StartHere.Tests\AppsLab-001-StartHere.Tests.csproj", "{FE64EA2A-841F-49D7-94C6-BB7E50FC972D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-002-ConsoleWriteLine", "src\AppsLab-002-ConsoleWriteLine\AppsLab-002-ConsoleWriteLine.csproj", "{8CA6707B-A381-4131-909F-50D592953588}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-002-ConsoleWriteLine", "src\AppsLab-002-ConsoleWriteLine\AppsLab-002-ConsoleWriteLine.csproj", "{8CA6707B-A381-4131-909F-50D592953588}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-005-DataTypes", "src\AppsLab-005-DataTypes\AppsLab-005-DataTypes.csproj", "{AB306D1E-2942-4297-ACC3-2975FB8BF18F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-005-DataTypes", "src\AppsLab-005-DataTypes\AppsLab-005-DataTypes.csproj", "{AB306D1E-2942-4297-ACC3-2975FB8BF18F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-006-Constants", "src\AppsLab-006-Constants\AppsLab-006-Constants.csproj", "{F1E80A4A-241C-496D-92D6-B047A0EAF030}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-006-Constants", "src\AppsLab-006-Constants\AppsLab-006-Constants.csproj", "{F1E80A4A-241C-496D-92D6-B047A0EAF030}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-007-Casting", "src\AppsLab-007-Casting\AppsLab-007-Casting.csproj", "{AEEAB66C-8B62-4844-A721-1FA49E82FDEB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-007-Casting", "src\AppsLab-007-Casting\AppsLab-007-Casting.csproj", "{AEEAB66C-8B62-4844-A721-1FA49E82FDEB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-007-Casting.Tests", "tests\AppsLab-007-Casting.Tests\AppsLab-007-Casting.Tests.csproj", "{5B78F61E-B52C-4920-BE97-42AADFAA726F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-007-Casting.Tests", "tests\AppsLab-007-Casting.Tests\AppsLab-007-Casting.Tests.csproj", "{5B78F61E-B52C-4920-BE97-42AADFAA726F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-008-ConsoleReadLine", "src\AppsLab-008-ConsoleReadLine\AppsLab-008-ConsoleReadLine.csproj", "{5314C734-E722-4454-A772-D0F4641E1563}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-008-ConsoleReadLine", "src\AppsLab-008-ConsoleReadLine\AppsLab-008-ConsoleReadLine.csproj", "{5314C734-E722-4454-A772-D0F4641E1563}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-009-Operators", "src\AppsLab-009-Operators\AppsLab-009-Operators.csproj", "{B6030D54-19E2-40EF-8C93-17669CEC23E0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-009-Operators", "src\AppsLab-009-Operators\AppsLab-009-Operators.csproj", "{B6030D54-19E2-40EF-8C93-17669CEC23E0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-009-Operators.Tests", "tests\AppsLab-009-Operators.Tests\AppsLab-009-Operators.Tests.csproj", "{A6659FD2-5F11-432B-91B7-C64EAEAF669C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-009-Operators.Tests", "tests\AppsLab-009-Operators.Tests\AppsLab-009-Operators.Tests.csproj", "{A6659FD2-5F11-432B-91B7-C64EAEAF669C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-010-Math", "src\AppsLab-010-Math\AppsLab-010-Math.csproj", "{FD645D4C-9DC8-4603-A77B-8A4782F175F4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-010-Math", "src\AppsLab-010-Math\AppsLab-010-Math.csproj", "{FD645D4C-9DC8-4603-A77B-8A4782F175F4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-010-Math.Tests", "tests\AppsLab-010-Math.Tests\AppsLab-010-Math.Tests.csproj", "{A4527295-4BEE-4E42-8855-B0503A4515E4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-010-Math.Tests", "tests\AppsLab-010-Math.Tests\AppsLab-010-Math.Tests.csproj", "{A4527295-4BEE-4E42-8855-B0503A4515E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-011-Strings", "src\AppsLab-011-Strings\AppsLab-011-Strings.csproj", "{E90B0337-37CA-401C-997C-05DD11E08FEF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-011-Strings", "src\AppsLab-011-Strings\AppsLab-011-Strings.csproj", "{E90B0337-37CA-401C-997C-05DD11E08FEF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-011-Strings.Tests", "tests\AppsLab-011-Strings.Tests\AppsLab-011-Strings.Tests.csproj", "{22097A4D-261D-4F21-8080-10B4DAAC9E01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-011-Strings.Tests", "tests\AppsLab-011-Strings.Tests\AppsLab-011-Strings.Tests.csproj", "{22097A4D-261D-4F21-8080-10B4DAAC9E01}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-012-Boolean", "src\AppsLab-012-Boolean\AppsLab-012-Boolean.csproj", "{EE7C6CDA-F919-4078-81DB-E4BA7F7DE34A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-012-Boolean", "src\AppsLab-012-Boolean\AppsLab-012-Boolean.csproj", "{EE7C6CDA-F919-4078-81DB-E4BA7F7DE34A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-012-Boolean.Tests", "tests\AppsLab-012-Boolean.Tests\AppsLab-012-Boolean.Tests.csproj", "{E41ECA72-68B0-4B1B-8A47-39C0E5DA9B94}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-012-Boolean.Tests", "tests\AppsLab-012-Boolean.Tests\AppsLab-012-Boolean.Tests.csproj", "{E41ECA72-68B0-4B1B-8A47-39C0E5DA9B94}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-013-Conditions", "src\AppsLab-013-Conditions\AppsLab-013-Conditions.csproj", "{AD575FD0-3F7B-4CA3-B802-9430C0F61A42}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-013-Conditions", "src\AppsLab-013-Conditions\AppsLab-013-Conditions.csproj", "{AD575FD0-3F7B-4CA3-B802-9430C0F61A42}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-013-Conditions.Tests", "tests\AppsLab-013-Conditions.Tests\AppsLab-013-Conditions.Tests.csproj", "{8B9BEF41-B5E2-4B56-AA43-F83249D4E639}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-013-Conditions.Tests", "tests\AppsLab-013-Conditions.Tests\AppsLab-013-Conditions.Tests.csproj", "{8B9BEF41-B5E2-4B56-AA43-F83249D4E639}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-014-Switch", "src\AppsLab-014-Switch\AppsLab-014-Switch.csproj", "{EBA30F52-B7DA-4B32-BE4F-6914145E2447}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-014-Switch", "src\AppsLab-014-Switch\AppsLab-014-Switch.csproj", "{EBA30F52-B7DA-4B32-BE4F-6914145E2447}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-014-Switch.Tests", "tests\AppsLab-014-Switch.Tests\AppsLab-014-Switch.Tests.csproj", "{6A95C2D3-3B32-4612-A909-2F2AC223416E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-014-Switch.Tests", "tests\AppsLab-014-Switch.Tests\AppsLab-014-Switch.Tests.csproj", "{6A95C2D3-3B32-4612-A909-2F2AC223416E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-015-Arrays", "src\AppsLab-015-Arrays\AppsLab-015-Arrays.csproj", "{DA216DFF-5EC8-4F02-9D0A-3D49212D6903}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-015-Arrays", "src\AppsLab-015-Arrays\AppsLab-015-Arrays.csproj", "{DA216DFF-5EC8-4F02-9D0A-3D49212D6903}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-015-Arrays.Tests", "tests\AppsLab-015-Arrays.Tests\AppsLab-015-Arrays.Tests.csproj", "{2BBC2988-4C3C-45B7-9EA6-F47A23260F32}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-015-Arrays.Tests", "tests\AppsLab-015-Arrays.Tests\AppsLab-015-Arrays.Tests.csproj", "{2BBC2988-4C3C-45B7-9EA6-F47A23260F32}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-016-Loops", "src\AppsLab-016-Loops\AppsLab-016-Loops.csproj", "{2A373E5B-4048-4E70-99EE-2676D2DA9952}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-016-Loops", "src\AppsLab-016-Loops\AppsLab-016-Loops.csproj", "{2A373E5B-4048-4E70-99EE-2676D2DA9952}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-016-Loops.Tests", "tests\AppsLab-016-Loops.Tests\AppsLab-016-Loops.Tests.csproj", "{DB34DF8E-3B5B-44CC-9245-AD79F3198BD3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-016-Loops.Tests", "tests\AppsLab-016-Loops.Tests\AppsLab-016-Loops.Tests.csproj", "{DB34DF8E-3B5B-44CC-9245-AD79F3198BD3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-017-List", "src\AppsLab-017-List\AppsLab-017-List.csproj", "{CEAA82FA-127F-47C2-B25F-5588FB63F7D1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-017-List", "src\AppsLab-017-List\AppsLab-017-List.csproj", "{CEAA82FA-127F-47C2-B25F-5588FB63F7D1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-017-List.Tests", "tests\AppsLab-017-List.Tests\AppsLab-017-List.Tests.csproj", "{FCEEAC1F-D3CF-4C18-9CA3-2288B5DFAA14}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-017-List.Tests", "tests\AppsLab-017-List.Tests\AppsLab-017-List.Tests.csproj", "{FCEEAC1F-D3CF-4C18-9CA3-2288B5DFAA14}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-018-Methods", "src\AppsLab-018-Methods\AppsLab-018-Methods.csproj", "{571B250E-E17D-4CD6-8778-52B838EB9DA0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-018-Methods", "src\AppsLab-018-Methods\AppsLab-018-Methods.csproj", "{571B250E-E17D-4CD6-8778-52B838EB9DA0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-018-Methods.Tests", "tests\AppsLab-018-Methods.Tests\AppsLab-018-Methods.Tests.csproj", "{526B06CA-4937-44F2-97FB-E85680DD7867}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-018-Methods.Tests", "tests\AppsLab-018-Methods.Tests\AppsLab-018-Methods.Tests.csproj", "{526B06CA-4937-44F2-97FB-E85680DD7867}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-019-MethodsOverloading", "src\AppsLab-019-MethodsOverloading\AppsLab-019-MethodsOverloading.csproj", "{24D704DB-AB81-4F18-899C-910E8D45FC8B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-019-MethodsOverloading", "src\AppsLab-019-MethodsOverloading\AppsLab-019-MethodsOverloading.csproj", "{24D704DB-AB81-4F18-899C-910E8D45FC8B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-019-MethodsOverloading.Tests", "tests\AppsLab-019-MethodsOverloading.Tests\AppsLab-019-MethodsOverloading.Tests.csproj", "{05E10AD6-94B3-4761-95E4-1F19E14F36D1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-019-MethodsOverloading.Tests", "tests\AppsLab-019-MethodsOverloading.Tests\AppsLab-019-MethodsOverloading.Tests.csproj", "{05E10AD6-94B3-4761-95E4-1F19E14F36D1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-020-OOP", "src\AppsLab-020-OOP\AppsLab-020-OOP.csproj", "{8CB5085F-5996-490C-90EC-022AB4AD9CBC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-020-OOP", "src\AppsLab-020-OOP\AppsLab-020-OOP.csproj", "{8CB5085F-5996-490C-90EC-022AB4AD9CBC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-021-Interfaces", "src\AppsLab-021-Interfaces\AppsLab-021-Interfaces.csproj", "{9E3CBBE1-9A1A-4C1C-817C-28D383D18384}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-021-Interfaces", "src\AppsLab-021-Interfaces\AppsLab-021-Interfaces.csproj", "{9E3CBBE1-9A1A-4C1C-817C-28D383D18384}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-022-Files", "src\AppsLab-022-Files\AppsLab-022-Files.csproj", "{D3BFAA25-E460-4EC1-A60C-C183775DE8CC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-022-Files", "src\AppsLab-022-Files\AppsLab-022-Files.csproj", "{D3BFAA25-E460-4EC1-A60C-C183775DE8CC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-024-Events", "src\AppsLab-024-Events\AppsLab-024-Events.csproj", "{FC964C5F-0F80-4EDF-97E8-A4A20DE5492D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-024-Events", "src\AppsLab-024-Events\AppsLab-024-Events.csproj", "{FC964C5F-0F80-4EDF-97E8-A4A20DE5492D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-025-Lambda", "src\AppsLab-025-Lambda\AppsLab-025-Lambda.csproj", "{80DD908F-E015-4FD0-93AA-743A22E745EE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-025-Lambda", "src\AppsLab-025-Lambda\AppsLab-025-Lambda.csproj", "{80DD908F-E015-4FD0-93AA-743A22E745EE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-026-LINQ", "src\AppsLab-026-LINQ\AppsLab-026-LINQ.csproj", "{AE78C877-CE90-425B-BDDE-4951C6C3B577}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-026-LINQ", "src\AppsLab-026-LINQ\AppsLab-026-LINQ.csproj", "{AE78C877-CE90-425B-BDDE-4951C6C3B577}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-027-Generics", "src\AppsLab-027-Generics\AppsLab-027-Generics.csproj", "{0333D249-02A9-47AD-BDA6-5FD7ABF7F066}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-027-Generics", "src\AppsLab-027-Generics\AppsLab-027-Generics.csproj", "{0333D249-02A9-47AD-BDA6-5FD7ABF7F066}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-028-Indexers", "src\AppsLab-028-Indexers\AppsLab-028-Indexers.csproj", "{FA0DDC17-5730-4310-A421-7668B21E1CDD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-028-Indexers", "src\AppsLab-028-Indexers\AppsLab-028-Indexers.csproj", "{FA0DDC17-5730-4310-A421-7668B21E1CDD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-029-Async", "src\AppsLab-029-Async\AppsLab-029-Async.csproj", "{EC3E5278-8120-4A67-A57B-B7DE5211E12A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-029-Async", "src\AppsLab-029-Async\AppsLab-029-Async.csproj", "{EC3E5278-8120-4A67-A57B-B7DE5211E12A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-030-JSON", "src\AppsLab-030-JSON\AppsLab-030-JSON.csproj", "{4D0AE262-0F9B-4E15-B5EA-6CCB0B81FE2C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-030-JSON", "src\AppsLab-030-JSON\AppsLab-030-JSON.csproj", "{4D0AE262-0F9B-4E15-B5EA-6CCB0B81FE2C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-031-XML", "src\AppsLab-031-XML\AppsLab-031-XML.csproj", "{7BEA7878-B5BA-4480-BC56-2F7B836F64B9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-031-XML", "src\AppsLab-031-XML\AppsLab-031-XML.csproj", "{7BEA7878-B5BA-4480-BC56-2F7B836F64B9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-033-NuGet", "src\AppsLab-033-NuGet\AppsLab-033-NuGet.csproj", "{38FFE1DF-4B49-40C1-9908-51860BCF2D3E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-033-NuGet", "src\AppsLab-033-NuGet\AppsLab-033-NuGet.csproj", "{38FFE1DF-4B49-40C1-9908-51860BCF2D3E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppsLab-034-Debug", "src\AppsLab-034-Debug\AppsLab-034-Debug.csproj", "{83C963FD-DC23-46E8-9545-F56197164810}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-034-Debug", "src\AppsLab-034-Debug\AppsLab-034-Debug.csproj", "{83C963FD-DC23-46E8-9545-F56197164810}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bonusova uloha mato", "bonusova uloha mato\bonusova uloha mato.csproj", "{098C4A3C-012A-431B-B923-ED87AC8A9837}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{BD75900C-0C16-433C-A21F-9FFAD4B50650}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp2", "ConsoleApp2\ConsoleApp2.csproj", "{548AB074-1F48-41CA-AB5B-9CC963BCEF7B}" EndProject Global - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 @@ -226,18 +229,6 @@ Global {A6659FD2-5F11-432B-91B7-C64EAEAF669C}.Release|x64.Build.0 = Release|Any CPU {A6659FD2-5F11-432B-91B7-C64EAEAF669C}.Release|x86.ActiveCfg = Release|Any CPU {A6659FD2-5F11-432B-91B7-C64EAEAF669C}.Release|x86.Build.0 = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|x64.ActiveCfg = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|x64.Build.0 = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|x86.ActiveCfg = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Debug|x86.Build.0 = Debug|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|Any CPU.Build.0 = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|x64.ActiveCfg = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|x64.Build.0 = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|x86.ActiveCfg = Release|Any CPU - {B141B973-9C0B-4512-B8B4-1237B596A8D2}.Release|x86.Build.0 = Release|Any CPU {FD645D4C-9DC8-4603-A77B-8A4782F175F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD645D4C-9DC8-4603-A77B-8A4782F175F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD645D4C-9DC8-4603-A77B-8A4782F175F4}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -634,6 +625,45 @@ Global {83C963FD-DC23-46E8-9545-F56197164810}.Release|x64.Build.0 = Release|Any CPU {83C963FD-DC23-46E8-9545-F56197164810}.Release|x86.ActiveCfg = Release|Any CPU {83C963FD-DC23-46E8-9545-F56197164810}.Release|x86.Build.0 = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|x64.ActiveCfg = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|x64.Build.0 = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|x86.ActiveCfg = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Debug|x86.Build.0 = Debug|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|Any CPU.ActiveCfg = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|Any CPU.Build.0 = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|x64.ActiveCfg = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|x64.Build.0 = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|x86.ActiveCfg = Release|Any CPU + {098C4A3C-012A-431B-B923-ED87AC8A9837}.Release|x86.Build.0 = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|x64.ActiveCfg = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|x64.Build.0 = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|x86.ActiveCfg = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Debug|x86.Build.0 = Debug|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|Any CPU.Build.0 = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|x64.ActiveCfg = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|x64.Build.0 = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|x86.ActiveCfg = Release|Any CPU + {BD75900C-0C16-433C-A21F-9FFAD4B50650}.Release|x86.Build.0 = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|x64.ActiveCfg = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|x64.Build.0 = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|x86.ActiveCfg = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Debug|x86.Build.0 = Debug|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|Any CPU.Build.0 = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x64.ActiveCfg = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x64.Build.0 = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x86.ActiveCfg = Release|Any CPU + {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {57860CA2-0054-465E-BD1E-024FF8D81354} = {56555FB0-B513-49EF-9002-A5AF135EA090} @@ -680,4 +710,7 @@ Global {38FFE1DF-4B49-40C1-9908-51860BCF2D3E} = {56555FB0-B513-49EF-9002-A5AF135EA090} {83C963FD-DC23-46E8-9545-F56197164810} = {56555FB0-B513-49EF-9002-A5AF135EA090} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9F81B22A-639D-4AD4-806B-1A99A73BDF19} + EndGlobalSection EndGlobal diff --git a/ConsoleApp1/ConsoleApp1.csproj b/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs new file mode 100644 index 00000000..5bf7d176 --- /dev/null +++ b/ConsoleApp1/Program.cs @@ -0,0 +1,41 @@ +////bool a = true; +////int b =5; +////int c =4; +////bool d = false; +////int e =5; +////bool vysledok = ((c <= b) || a!) && (a == (e == b)); +////Console.WriteLine(vysledok); +////bool a = true; +////int b = 4 +////int d + + + +////bool vysledok2 = (!(a && d ) || (!(b < e) && !vysledok)); + + +//Console.WriteLine("Zadaj cislo od 1 do 6"); +//int cislo = int.Parse(Console.ReadLine()); +//if (cislo == 6) +//{ +// string input = Console.ReadLine(); +// Console.WriteLine("ideš ešte raz"); +//} +//else if (cislo <= 5) +//{ +// Console.WriteLine($"Ides na policko cislo {cislo}"); +//} + +using System.ComponentModel.Design; + +string? input = Console.ReadLine(); +int number = int.Parse(input); +if (number >=1 && number <=6); +{ + Console.WriteLine("Huraaa mam kocku"); +} +else + +{ + Console.WriteLine("Fuj!Daj mi kocku"); +} \ No newline at end of file diff --git a/ConsoleApp2/ConsoleApp2.csproj b/ConsoleApp2/ConsoleApp2.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/ConsoleApp2/ConsoleApp2.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/ConsoleApp2/Program.cs b/ConsoleApp2/Program.cs new file mode 100644 index 00000000..06573ad3 --- /dev/null +++ b/ConsoleApp2/Program.cs @@ -0,0 +1,16 @@ +Console.WriteLine("Zadaj Cislo: "); +int cislo1 = int.Parse(Console.ReadLine()); +Console.WriteLine("Zadaj druhe cislo: "); +int cislo2 = int.Parse(Console.ReadLine()); +Console.WriteLine("Zadaj operaciu(+,-,*,/)"); +var Operacia = Console.ReadLine(); +int sucet = cislo1 + cislo2; +int rozideil = cislo1 - cislo2; + + + + + + + + diff --git a/bonusova uloha mato/Program.cs b/bonusova uloha mato/Program.cs new file mode 100644 index 00000000..bdff40f0 --- /dev/null +++ b/bonusova uloha mato/Program.cs @@ -0,0 +1,25 @@ +//int a = 1; +//int b = 2; +//int sum = a + b; +//int rozdiel = a - b; +//int násobenie = a * b; +//int delenie = a / b; +//int remainder = a % b; +//bool equality = a == b; +//bool inequality = a != b; +//bool greater = a > b; +//bool lesser = a < b; +//bool greaterEqual = a >= b; +//bool lesserEqual = a <= b; + + +bool a = true; +int b = 74; +int c = 42; + + +bool andBool1 = a && (b > c); +bool orBool2 = a && (b == c); +bool andBool3 = a && (b == c) || (b < c); +bool andBool4 = a && ((b == c) || (b < c)); + diff --git a/bonusova uloha mato/bonusova uloha mato.csproj b/bonusova uloha mato/bonusova uloha mato.csproj new file mode 100644 index 00000000..fe529550 --- /dev/null +++ b/bonusova uloha mato/bonusova uloha mato.csproj @@ -0,0 +1,11 @@ + + + + Exe + net7.0 + bonusova_uloha_mato + enable + enable + + + diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index c63b9e37..cf0a638e 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -1,13 +1,12 @@ -Console.WriteLine("Ako sa voláš?"); -string? meno = Console.ReadLine(); -Console.WriteLine("Ahoj,Rudolf koľko máš rokov ?"); -string vstup = Console.ReadLine() ?? "0"; -int vek = int.Parse(vstup); -Console.WriteLine("Aha,máš teda 16 rokov."); -Console.WriteLine("Aké je tvoje obľúbené jedlo?"); -string jedlo = Console.ReadLine(); -Console.WriteLine($"Hmm,{jedlo} znie skvele!"); -Console.WriteLine("stlač klávesu : "); -var key=Console.ReadKey(); -Console.WriteLine(); -Console.WriteLine($"Stlačili ste klávesu:{key.KeyChar} "); +Console.WriteLine("Moja Kalkulačka"); +String? prveCislo = Console.ReadLine(); +string? druheCislo = Console.ReadLine(); +int sucet = int.Parse(prveCislo) + int.Parse(druheCislo); +Console.WriteLine($"Sucet: {sucet}"); + + +int a = 1; +int b = 2; +int sum =a + b; + + From 68d89504c876838afa5a054e014d201eca011cb6 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 8 Oct 2025 07:57:41 +0200 Subject: [PATCH 09/16] kalkulacka --- ConsoleApp2/Program.cs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ConsoleApp2/Program.cs b/ConsoleApp2/Program.cs index 06573ad3..15a85a52 100644 --- a/ConsoleApp2/Program.cs +++ b/ConsoleApp2/Program.cs @@ -4,11 +4,24 @@ int cislo2 = int.Parse(Console.ReadLine()); Console.WriteLine("Zadaj operaciu(+,-,*,/)"); var Operacia = Console.ReadLine(); -int sucet = cislo1 + cislo2; -int rozideil = cislo1 - cislo2; - - - +int vysledok = 0; +if (Operacia == "+") +{ + vysledok = cislo1 + cislo2; +} +else if (Operacia == "-") +{ + vysledok = cislo1 + cislo2; +} +else if (Operacia == "*") +{ + vysledok = cislo1 * cislo2; +} +else if (Operacia == "/") +{ + vysledok = cislo1 / cislo2; +} +Console.WriteLine($"vysledok je {vysledok}"); From 2dbbe923f7a8108133f28a77e27ff3466f55be81 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 8 Oct 2025 10:56:55 +0200 Subject: [PATCH 10/16] film ratinig --- ConsoleApp1/Program.cs | 41 +++++++++--- src/AppsLab-002-ConsoleWriteLine/Program.cs | 22 +++++-- src/AppsLab-005-DataTypes/Program.cs | 69 ++++++++++++++++----- src/AppsLab-006-Constants/Program.cs | 25 ++++++-- src/AppsLab-008-ConsoleReadLine/Program.cs | 33 +++++++--- src/AppsLab-014-Switch/MovieRating.cs | 20 +++++- 6 files changed, 167 insertions(+), 43 deletions(-) diff --git a/ConsoleApp1/Program.cs b/ConsoleApp1/Program.cs index 5bf7d176..a7302ebc 100644 --- a/ConsoleApp1/Program.cs +++ b/ConsoleApp1/Program.cs @@ -26,16 +26,39 @@ // Console.WriteLine($"Ides na policko cislo {cislo}"); //} -using System.ComponentModel.Design; +//using System.ComponentModel.Design; -string? input = Console.ReadLine(); -int number = int.Parse(input); -if (number >=1 && number <=6); +//string? input = Console.ReadLine(); +//int number = int.Parse(input); +//if (number >=1 && number <=6) +//{ +// Console.WriteLine("Huraaa mam kocku"); +//} + +//else +//{ +// Console.WriteLine("Fuj!Daj mi kocku"); +//} + + + + + +string text = "qwerty"; +text = "iny text"; +text += "pridany text"; +int vek = 18; + int vek1 = 20; +vek += 5; +vek = 20; + +if (vek > 18) { - Console.WriteLine("Huraaa mam kocku"); + Console.WriteLine("si dospely"); } -else - +else if (vek >= 20) { - Console.WriteLine("Fuj!Daj mi kocku"); -} \ No newline at end of file + +} + + diff --git a/src/AppsLab-002-ConsoleWriteLine/Program.cs b/src/AppsLab-002-ConsoleWriteLine/Program.cs index c0e06b1e..26547011 100644 --- a/src/AppsLab-002-ConsoleWriteLine/Program.cs +++ b/src/AppsLab-002-ConsoleWriteLine/Program.cs @@ -1,5 +1,19 @@ -int age = 16; -string name = "Rudolf"; +Console.WriteLine("ahij"); + +string text = "qwerty"; +text = "iny text"; +text += "pridany text"; +int vek = 18; +int vek1 = 20; +vek += 5; +vek = 20; + +if (vek > 18) +{ + Console.WriteLine("si dospely"); +} +else if (vek >= 20) +{ + +} -Console.WriteLine(age); -Console.WriteLine(name); diff --git a/src/AppsLab-005-DataTypes/Program.cs b/src/AppsLab-005-DataTypes/Program.cs index 151a8431..51d2e221 100644 --- a/src/AppsLab-005-DataTypes/Program.cs +++ b/src/AppsLab-005-DataTypes/Program.cs @@ -1,16 +1,57 @@  -int mojeCislo = 1234; -string mojeSlovo = "Ahoj , Svet!"; -bool mojaBoolHodnota = true; -DateTime dnesnyDatum = DateTime.Now; -float myFloat = 5.75f; -int sucet = mojeCislo + 5; -var myVar = "Toto je var string"; -Console.WriteLine(mojeCislo.ToString("777777")); -Console.WriteLine(mojeSlovo); -Console.WriteLine($"Súčet je:{sucet}"); -Console.WriteLine($"Dnes je: {dnesnyDatum.ToString("yyyy-MM-dd")}"); -Console.WriteLine($"Bool hodnota je: {mojaBoolHodnota}"); -const int MaxStudents = 15; -Console.WriteLine("Maximálny počet študentov v triede je:" + MaxStudents); +//int mojeCislo = 1234; +//string mojeSlovo = "Ahoj , Svet!"; +//bool mojaBoolHodnota = true; +//DateTime dnesnyDatum = DateTime.Now; +//float myFloat = 5.75f; +//int sucet = mojeCislo + 5; +//var myVar = "Toto je var string"; +//Console.WriteLine(mojeCislo.ToString("777777")); +//Console.WriteLine(mojeSlovo); +//Console.WriteLine($"Súčet je:{sucet}"); +//Console.WriteLine($"Dnes je: {dnesnyDatum.ToString("yyyy-MM-dd")}"); +//Console.WriteLine($"Bool hodnota je: {mojaBoolHodnota}"); +//const int MaxStudents = 15; +//Console.WriteLine("Maximálny počet študentov v triede je:" + MaxStudents); + + + + +Console.Write("zadajte cislo 1: *"); +int cislo1 = int.Parse(Console.ReadLine()); + +Console.Write("zadajte cislo2 : *"); +decimal cislo2 = int.Parse(Console.ReadLine()); + +Console.Write("zadajte operaciu:"); +string operacia = Console.ReadLine(); +decimal vysledok = 0; +switch(operacia) +{ + +case "+": + vysledok = cislo1 + cislo2; + break; + case "-": + vysledok = cislo1 - cislo2; + break; +case "*": + vysledok = cislo1 * cislo2; + break; +case "/": + if (cislo2 != 0) + { + vysledok = cislo1 / cislo2; + + } + else + { + Console.WriteLine("chyba: delenie nulou nie"); + } + break; +default: + Console.WriteLine("neznama operacia." ); + break; +} + diff --git a/src/AppsLab-006-Constants/Program.cs b/src/AppsLab-006-Constants/Program.cs index 62fab2d9..99431e24 100644 --- a/src/AppsLab-006-Constants/Program.cs +++ b/src/AppsLab-006-Constants/Program.cs @@ -1,7 +1,20 @@  -const int Maxpoints = 100; -const int MinAgeForDriversLicense = 17; -const string WelcomeMessage = "Vitajte v našej hre!"; -Console.WriteLine(Maxpoints); -Console.WriteLine(MinAgeForDriversLicense); -Console.WriteLine(WelcomeMessage); +//const int Maxpoints = 100; +//const int MinAgeForDriversLicense = 17; +//const string WelcomeMessage = "Vitajte v našej hre!"; +//Console.WriteLine(Maxpoints); +//Console.WriteLine(MinAgeForDriversLicense); +//Console.WriteLine(WelcomeMessage); + +int number = 3; + +string numberDescription = number switch +{ + 1 => "jeden", + 2 => "dva", + 3 => "tri", + _ => "nezname cislo" + +}; + +Console.WriteLine(numberDescription); diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index cf0a638e..8ead4f3a 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -1,12 +1,29 @@ -Console.WriteLine("Moja Kalkulačka"); -String? prveCislo = Console.ReadLine(); -string? druheCislo = Console.ReadLine(); -int sucet = int.Parse(prveCislo) + int.Parse(druheCislo); -Console.WriteLine($"Sucet: {sucet}"); +//Console.WriteLine("Moja Kalkulačka"); +//String? prveCislo = Console.ReadLine(); +//string? druheCislo = Console.ReadLine(); +//int sucet = int.Parse(prveCislo) + int.Parse(druheCislo); +//Console.WriteLine($"Sucet: {sucet}"); -int a = 1; -int b = 2; -int sum =a + b; +//int a = 1; +//int b = 2; +//int sum =a + b; +//Console.WriteLine("Zadaj Cislo: "); +//int cislo1 = int.Parse(Console.ReadLine()); +//Console.WriteLine("Zadaj druhe cislo: "); +//int cislo2 = int.Parse(Console.ReadLine()); +//Console.WriteLine("Zadaj operaciu(+,-,*,/)"); +//var Operacia = Console.ReadLine(); +//int vysledok = Operacia switch +//{ +// "+" => cislo1 + cislo2; +// "-" => cislo1 - cislo2; +// "+" => cislo1 + cislo2; +// "/" +> cislo1 / cislo2; +//} + + +//} +Console diff --git a/src/AppsLab-014-Switch/MovieRating.cs b/src/AppsLab-014-Switch/MovieRating.cs index ab689d49..2c51c930 100644 --- a/src/AppsLab-014-Switch/MovieRating.cs +++ b/src/AppsLab-014-Switch/MovieRating.cs @@ -12,6 +12,22 @@ public class MovieRating /// A string describing the specified movie rating. public string GetRatingDescription(int rating) { - throw new NotImplementedException(); + switch (rating) + { + case 1: + return "Veľmi zlý"; + case 2: + return "Zlý"; + case 3: + return "Priemerný"; + case 4: + return "Dobrý"; + case 5: + return "Výborný"; + default: + return "Neplatné hodnotenie"; + + + } } -} \ No newline at end of file +} From f4c911b4ba9108869afdcfe83c96ac2e88f1dc72 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 15 Oct 2025 13:01:11 +0200 Subject: [PATCH 11/16] lulohy od mata 2 --- AppsLab.CSharp.Exercises.sln | 48 ++++++++++- ConsoleApp3/ConsoleApp3.csproj | 10 +++ ConsoleApp3/Program.cs | 10 +++ hviezdicky/Program.cs | 37 ++++++++ hviezdicky/hviezdicky.csproj | 10 +++ sompicisro/Program.cs | 19 +++++ sompicisro/sompicisro.csproj | 10 +++ src/AppsLab-008-ConsoleReadLine/Program.cs | 89 +++++++++++++++++++- src/AppsLab-011-Strings/StringManipulator.cs | 15 ++-- src/AppsLab-015-Arrays/ArrayProcessor.cs | 28 ++++-- src/AppsLab-016-Loops/WeatherStats.cs | 44 ++++++++-- tests/AppsLab-011-Strings.Tests/Usings.cs | 1 - tests/AppsLab-015-Arrays.Tests/Usings.cs | 14 ++- 13 files changed, 311 insertions(+), 24 deletions(-) create mode 100644 ConsoleApp3/ConsoleApp3.csproj create mode 100644 ConsoleApp3/Program.cs create mode 100644 hviezdicky/Program.cs create mode 100644 hviezdicky/hviezdicky.csproj create mode 100644 sompicisro/Program.cs create mode 100644 sompicisro/sompicisro.csproj diff --git a/AppsLab.CSharp.Exercises.sln b/AppsLab.CSharp.Exercises.sln index 942f753a..d2940b58 100644 --- a/AppsLab.CSharp.Exercises.sln +++ b/AppsLab.CSharp.Exercises.sln @@ -93,11 +93,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-033-NuGet", "src\Ap EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppsLab-034-Debug", "src\AppsLab-034-Debug\AppsLab-034-Debug.csproj", "{83C963FD-DC23-46E8-9545-F56197164810}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bonusova uloha mato", "bonusova uloha mato\bonusova uloha mato.csproj", "{098C4A3C-012A-431B-B923-ED87AC8A9837}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bonusova uloha mato", "bonusova uloha mato\bonusova uloha mato.csproj", "{098C4A3C-012A-431B-B923-ED87AC8A9837}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{BD75900C-0C16-433C-A21F-9FFAD4B50650}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{BD75900C-0C16-433C-A21F-9FFAD4B50650}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp2", "ConsoleApp2\ConsoleApp2.csproj", "{548AB074-1F48-41CA-AB5B-9CC963BCEF7B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp2", "ConsoleApp2\ConsoleApp2.csproj", "{548AB074-1F48-41CA-AB5B-9CC963BCEF7B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp3", "ConsoleApp3\ConsoleApp3.csproj", "{C1C44D69-7827-4887-AC6B-AA70EC9D5846}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hviezdicky", "hviezdicky\hviezdicky.csproj", "{FF5B2B72-877D-4A67-9DE3-595E87121441}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sompicisro", "sompicisro\sompicisro.csproj", "{F49B8C2A-D804-44DA-83D5-6D5C32776099}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -661,6 +667,42 @@ Global {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x64.Build.0 = Release|Any CPU {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x86.ActiveCfg = Release|Any CPU {548AB074-1F48-41CA-AB5B-9CC963BCEF7B}.Release|x86.Build.0 = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|x64.ActiveCfg = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|x64.Build.0 = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|x86.ActiveCfg = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Debug|x86.Build.0 = Debug|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|Any CPU.Build.0 = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|x64.ActiveCfg = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|x64.Build.0 = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|x86.ActiveCfg = Release|Any CPU + {C1C44D69-7827-4887-AC6B-AA70EC9D5846}.Release|x86.Build.0 = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|x64.ActiveCfg = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|x64.Build.0 = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|x86.ActiveCfg = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Debug|x86.Build.0 = Debug|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|Any CPU.Build.0 = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|x64.ActiveCfg = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|x64.Build.0 = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|x86.ActiveCfg = Release|Any CPU + {FF5B2B72-877D-4A67-9DE3-595E87121441}.Release|x86.Build.0 = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|x64.ActiveCfg = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|x64.Build.0 = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|x86.ActiveCfg = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Debug|x86.Build.0 = Debug|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|Any CPU.Build.0 = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x64.ActiveCfg = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x64.Build.0 = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x86.ActiveCfg = Release|Any CPU + {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ConsoleApp3/ConsoleApp3.csproj b/ConsoleApp3/ConsoleApp3.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/ConsoleApp3/ConsoleApp3.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/ConsoleApp3/Program.cs b/ConsoleApp3/Program.cs new file mode 100644 index 00000000..8d1174a6 --- /dev/null +++ b/ConsoleApp3/Program.cs @@ -0,0 +1,10 @@ +//internal class Program +//{ +// private static void Main(string[] args) +// { +// string[] names = { "Ako", "sa", "mas?" }; +// foreach (string name in names) +// { +// Console.WriteLine(${ "names"}) +//} +// } diff --git a/hviezdicky/Program.cs b/hviezdicky/Program.cs new file mode 100644 index 00000000..553f9897 --- /dev/null +++ b/hviezdicky/Program.cs @@ -0,0 +1,37 @@ +//string i = ("*"); +//Console.WriteLine(i); +//while (i.Length < 5) +//{ +// i = (i + "*"); +// Console.WriteLine(i); +//} +//i = ("**"); +//Console.WriteLine(i); +//while (i.Length < 5) +//{ +// i = (i + "*"); +// Console.WriteLine(i); +//} + + + + +string i = ("77"); +Console.WriteLine(i); +while (int.Parse(i) < 88) +{ + i=(int.Parse(i) + 1).ToString(); + Console.WriteLine(i); +} +int[] numbers = new int[10] { 11, 50, 48, 49, 6, 5, 7, 1, 18, 11 }; + +int vysledok = 0; +for (int i = 0; i < numbers.Length; i++) +{ + vysledok += numbers[i]; +} +Console.WriteLine(vysledok); + + + + diff --git a/hviezdicky/hviezdicky.csproj b/hviezdicky/hviezdicky.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/hviezdicky/hviezdicky.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/sompicisro/Program.cs b/sompicisro/Program.cs new file mode 100644 index 00000000..2e149b58 --- /dev/null +++ b/sompicisro/Program.cs @@ -0,0 +1,19 @@ +List numbers = new List(); +Console.WriteLine("zadaj cislo"); +string vstup = Console.ReadLine(); +while (vstup != "+") +{ + numbers.Add(int.Parse(vstup)); + Console.WriteLine("zadaj cislo"); + vstup = Console.ReadLine(); +}/Console.WriteLine("vysledok scitania:"); +int sucet = 0; +foreach (int i in numbers) +{ + sucet += i; +} +Console.WriteLine(sucet); +numbers.Add(int.Parse(vstup)); +Console.WriteLine($"Do zoznamu si pridal cislo {vstup}"); + + diff --git a/sompicisro/sompicisro.csproj b/sompicisro/sompicisro.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/sompicisro/sompicisro.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index 8ead4f3a..91a91929 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -26,4 +26,91 @@ //} -Console +//Console.WriteLine("1"); +//Console.WriteLine("2"); +//Console.WriteLine("3"); +//Console.WriteLine("4"); +//Console.WriteLine("5"); +//Console.WriteLine("6"); +//Console.WriteLine("7"); +//Console.WriteLine("8"); +//Console.WriteLine("9"); +//Console.WriteLine("10"); + +//int i = 1; +//while (i <= 1000) +//{ +// Console.WriteLine(i); +// i++; +//} + +//for (int i = 1; i <= 1000; i++) +//{ +// int modulo = i % 2; +// if (modulo==0) +// { +// Console.WriteLine(i); +// } + +//} +//int[] numbers = new int[] { 10, 300, 20, 40, 50 }; +//string[] names = new string[] { "Janko", "Fero", "Miro", "Laco", "Palo" }; +//string[,] matrix = new string[30, 5]; +//matrix[0, 2] = "Janko"; +//matrix[1, 2] = "Fero"; +//matrix[25, 4] = "Miro"; +//for (int i = 0; i < 30; i++) +//{ +//for (int j = 0; j < 30; j++) +// { +// Console.Write(matrix[i, j] + ","); +// } +//Console.WriteLine(); +//} +//int[] numbers = new int[5]; +//numbers[0] = 10; +//numbers[1] = 300; +//numbers[2] = 20; +//numbers[3] = 40; +//numbers[4] = 50; + +//int index = 0; +//while (index < 5) +//{ +// Console.WriteLine(numbers[index]); +// index++; +//} + +//for (int i = 0; i < 5; i++) +//{ +// Console.WriteLine(numbers[i]); +//} +//foreach (int number in numbers) +//{ +// Console.WriteLine(number); +//} + + +string meno = ZiskajMeno(); +string vek = ZiskajVek(); + +Console.WriteLine($"Ahoj {meno}.Tvoj vek je {vek} rokov"); + +string ZiskajMeno() +{ + Console.WriteLine("Zadaj meno"); + string meno = Console.ReadLine(); + return meno; +} +string ZiskajVek() +{ + Console.WriteLine("Zadaj vej"); + string vek = Console.ReadLine(); + return vek; + +} +void VypisUdaje(string meno, string vek) +{ + Console.WriteLine($"Ahoj {meno}. Tvoj vek je {vek} rokov"); +} + diff --git a/src/AppsLab-011-Strings/StringManipulator.cs b/src/AppsLab-011-Strings/StringManipulator.cs index f226d70d..c60ea929 100644 --- a/src/AppsLab-011-Strings/StringManipulator.cs +++ b/src/AppsLab-011-Strings/StringManipulator.cs @@ -13,7 +13,7 @@ public class StringManipulator /// The concatenated string. public string AppendStrings(string first, string second) { - throw new NotImplementedException(); + return first + second; } /// @@ -23,7 +23,7 @@ public string AppendStrings(string first, string second) /// The uppercase string. public string ConvertToUpper(string input) { - throw new NotImplementedException(); + return input.ToUpper(); } /// @@ -33,7 +33,7 @@ public string ConvertToUpper(string input) /// The lowercase string. public string ConvertToLower(string input) { - throw new NotImplementedException(); + return input.ToLower(); } /// @@ -44,7 +44,7 @@ public string ConvertToLower(string input) /// True if the substring is found, false otherwise. public bool ContainsSubstring(string input, string substring) { - throw new NotImplementedException(); + return input.Contains(substring); } /// @@ -55,6 +55,11 @@ public bool ContainsSubstring(string input, string substring) /// True if the string starts with the substring, false otherwise. public bool StartsWithSubstring(string input, string substring) { - throw new NotImplementedException(); + return input.StartsWith(substring); + } + public string BezMedzier(string input) + + { + return input.Trim(); } } \ No newline at end of file diff --git a/src/AppsLab-015-Arrays/ArrayProcessor.cs b/src/AppsLab-015-Arrays/ArrayProcessor.cs index 59f8d1c7..e61a7128 100644 --- a/src/AppsLab-015-Arrays/ArrayProcessor.cs +++ b/src/AppsLab-015-Arrays/ArrayProcessor.cs @@ -13,7 +13,12 @@ public class ArrayProcessor /// First element of the array, or 0 if array is empty. public int GetFirstElement(int[] numbers) { - throw new NotImplementedException(); + if numbers == null || numbers.Length == 0) + + { + return 0; + } + return numbers[0]; } /// @@ -24,7 +29,11 @@ public int GetFirstElement(int[] numbers) /// Last element of the array, or 0 if array is empty. public int GetLastElement(int[] numbers) { - throw new NotImplementedException(); + if (numbers is null || numbers.Length == 0) + { + return 0; + } + return numbers[numbers.Length - 1]; } /// @@ -35,9 +44,17 @@ public int GetLastElement(int[] numbers) /// Position of the desired element. /// Element at the specified position, or 0 if position is out of range. public int GetElementAtPosition(int[] numbers, int position) - { - throw new NotImplementedException(); + + { + if (numbers is null || numbers.Length == 0 || position >= numbers.Length) + { + return 0; + + + } + return numbers[position]; } + /// /// Returns the length of the provided array. @@ -46,6 +63,7 @@ public int GetElementAtPosition(int[] numbers, int position) /// Length of the array. public int GetLength(int[] numbers) { - throw new NotImplementedException(); + + if (numbers is null) } } diff --git a/src/AppsLab-016-Loops/WeatherStats.cs b/src/AppsLab-016-Loops/WeatherStats.cs index 8bca9659..07b59597 100644 --- a/src/AppsLab-016-Loops/WeatherStats.cs +++ b/src/AppsLab-016-Loops/WeatherStats.cs @@ -1,4 +1,6 @@ -namespace AppsLab_016_Loops; +using System.Reflection.Metadata.Ecma335; + +namespace AppsLab_016_Loops; /// /// Class to calculate weather statistics. @@ -12,7 +14,13 @@ public class WeatherStats /// Average temperature. public double AverageTemperature(double[] temperatures) { - throw new NotImplementedException(); + double average = 0; + foreach (var temperature in temperatures) + { + average += temperature; + } + average/= temperatures.Length; + return average; } /// @@ -22,7 +30,16 @@ public double AverageTemperature(double[] temperatures) /// Maximum temperature. public double MaxTemperature(double[] temperatures) { - throw new NotImplementedException(); + double maximum = double.MinValue; + foreach (double temperature in temperatures) + { + if (temperature > maximum) + { + + maximum = temperature; + } + } + return maximum; } /// @@ -30,8 +47,19 @@ public double MaxTemperature(double[] temperatures) /// /// Array of temperatures. /// Minimum temperature. - public double MinTemperature(double[] temperatures) - { - throw new NotImplementedException(); - } -} +// public double MinTemperature(double[] temperatures) +// { +// double minimum = double.MinValue; +// foreach (double temperature in temperatures) +// { +// if (temperature > minimum) +// { + +// minimum = temperatures; +// } + +// } + +// } +// return = minimum temperatures +//} diff --git a/tests/AppsLab-011-Strings.Tests/Usings.cs b/tests/AppsLab-011-Strings.Tests/Usings.cs index cefced49..e69de29b 100644 --- a/tests/AppsLab-011-Strings.Tests/Usings.cs +++ b/tests/AppsLab-011-Strings.Tests/Usings.cs @@ -1 +0,0 @@ -global using NUnit.Framework; \ No newline at end of file diff --git a/tests/AppsLab-015-Arrays.Tests/Usings.cs b/tests/AppsLab-015-Arrays.Tests/Usings.cs index cefced49..25f8e865 100644 --- a/tests/AppsLab-015-Arrays.Tests/Usings.cs +++ b/tests/AppsLab-015-Arrays.Tests/Usings.cs @@ -1 +1,13 @@ -global using NUnit.Framework; \ No newline at end of file +using System.Globalization; + +if (numbers is null || Numbers.Length== 0) +{ + if (numbers is null || numbers.Length == 0) + { + return 0; + } + +} return numbers + + +} \ No newline at end of file From 2574f9122897d507f5df47ae14307645b6fec30c Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 22 Oct 2025 12:52:16 +0200 Subject: [PATCH 12/16] grafity 22.10. --- AppsLab.CSharp.Exercises.sln | 35 +- grafity/Program.cs | 430 +++++++++++++++++++++ grafity/grafity.csproj | 10 + hviezdicky/Program.cs | 30 +- sompicisro/Program.cs | 34 +- src/AppsLab-008-ConsoleReadLine/Program.cs | 44 +-- src/AppsLab-016-Loops/WeatherStats.cs | 13 +- ulohy z 22.10/Program.cs | 1 + ulohy z 22.10/ulohy z 22.10..csproj | 11 + 9 files changed, 545 insertions(+), 63 deletions(-) create mode 100644 grafity/Program.cs create mode 100644 grafity/grafity.csproj create mode 100644 ulohy z 22.10/Program.cs create mode 100644 ulohy z 22.10/ulohy z 22.10..csproj diff --git a/AppsLab.CSharp.Exercises.sln b/AppsLab.CSharp.Exercises.sln index d2940b58..3b4668e3 100644 --- a/AppsLab.CSharp.Exercises.sln +++ b/AppsLab.CSharp.Exercises.sln @@ -99,11 +99,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp1", "ConsoleApp1\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp2", "ConsoleApp2\ConsoleApp2.csproj", "{548AB074-1F48-41CA-AB5B-9CC963BCEF7B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp3", "ConsoleApp3\ConsoleApp3.csproj", "{C1C44D69-7827-4887-AC6B-AA70EC9D5846}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp3", "ConsoleApp3\ConsoleApp3.csproj", "{C1C44D69-7827-4887-AC6B-AA70EC9D5846}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hviezdicky", "hviezdicky\hviezdicky.csproj", "{FF5B2B72-877D-4A67-9DE3-595E87121441}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "hviezdicky", "hviezdicky\hviezdicky.csproj", "{FF5B2B72-877D-4A67-9DE3-595E87121441}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sompicisro", "sompicisro\sompicisro.csproj", "{F49B8C2A-D804-44DA-83D5-6D5C32776099}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sompicisro", "sompicisro\sompicisro.csproj", "{F49B8C2A-D804-44DA-83D5-6D5C32776099}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ulohy z 22.10.", "ulohy z 22.10\ulohy z 22.10..csproj", "{923DCDA4-D9EB-4F48-819A-35A9F084CD82}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "grafity", "grafity\grafity.csproj", "{07A43EA7-6415-4F24-BEB3-EFAA99783624}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -703,6 +707,30 @@ Global {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x64.Build.0 = Release|Any CPU {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x86.ActiveCfg = Release|Any CPU {F49B8C2A-D804-44DA-83D5-6D5C32776099}.Release|x86.Build.0 = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|x64.ActiveCfg = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|x64.Build.0 = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|x86.ActiveCfg = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Debug|x86.Build.0 = Debug|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|Any CPU.Build.0 = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|x64.ActiveCfg = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|x64.Build.0 = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|x86.ActiveCfg = Release|Any CPU + {923DCDA4-D9EB-4F48-819A-35A9F084CD82}.Release|x86.Build.0 = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|x64.ActiveCfg = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|x64.Build.0 = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|x86.ActiveCfg = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Debug|x86.Build.0 = Debug|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|Any CPU.Build.0 = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x64.ActiveCfg = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x64.Build.0 = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x86.ActiveCfg = Release|Any CPU + {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -751,6 +779,7 @@ Global {7BEA7878-B5BA-4480-BC56-2F7B836F64B9} = {56555FB0-B513-49EF-9002-A5AF135EA090} {38FFE1DF-4B49-40C1-9908-51860BCF2D3E} = {56555FB0-B513-49EF-9002-A5AF135EA090} {83C963FD-DC23-46E8-9545-F56197164810} = {56555FB0-B513-49EF-9002-A5AF135EA090} + {07A43EA7-6415-4F24-BEB3-EFAA99783624} = {56555FB0-B513-49EF-9002-A5AF135EA090} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9F81B22A-639D-4AD4-806B-1A99A73BDF19} diff --git a/grafity/Program.cs b/grafity/Program.cs new file mode 100644 index 00000000..2b7aae2b --- /dev/null +++ b/grafity/Program.cs @@ -0,0 +1,430 @@ +Console.ForegroundColor = ConsoleColor.Magenta; +Console.BackgroundColor = ConsoleColor.White; +Console.WriteLine("Zadajte pismeno:"); +string input = Console.ReadLine();; +string output = ""; +string[,] matrix = new string[35, 120]; +int offset = 0; + + +foreach (char inputletter in input) +{ + string outLetter = GetLetter (inputletter.ToString()); + string[] lines = outLetter.Split(Environment.NewLine); + int letterWidth = 0; + for (int i = 0; i < lines.Length; i++) + { + string character = lines[i]; + letterWidth = Math.Max(lines[i].Length, letterWidth); + for (int j = 0; j < character.Length; j++) + { + matrix[i, j + offset] = character[j].ToString(); + } + + } + + offset = offset + letterWidth; +} +Console.WriteLine(); +for (int i = 0; i < matrix.GetLength(0); i++) +{ + for (int j = 0; j < matrix.GetLength(1); j++) + { + Console.Write(matrix[i, j]); + } + Console.WriteLine(); +} + + + + +Console.WriteLine (output); +string GetLetter(string input) +{ + switch (input) + { + case "a": + case "A": + return GetLetterA(); + case "B": + case "b": + return GetLetterB(); + case "C": + case "c": + return GetLetterC(); + case "D": + case "d": + return GetLetterD(); + case "E": + case "e": + return GetLetterE(); + case "F": + case "f": + return GetletterF(); + case "G": + case "g": + return GetLetterG(); + case "H": + case "h": + return GetLetterH(); + case "I": + case "i": + return GetLetterI(); + case "J": + case "j": + return GetLetterJ(); + case "K": + case "k": + return GetLetterK(); + case "L": + case "l": + return GetLetterL(); + case "M": + case "m": + return GetLetterM(); + case "N": + case "n": + return GetLetterN(); + case "O": + case "o": + return GetLetterO(); + case "P": + case "p": + return GetLetterP(); + case "Q": + case "q": + return GetLetterQ(); + case "R": + case "r": + return GetLetteR(); + case "S": + case "s": + return GetLetterS(); + case "T": + case "t": + return GetLetterT(); + case "U": + case "u": + return GetLetterU(); + case "V": + case "v": + return GetLetterV(); + case "X": + case "x": + return GetLetterX(); + case "Y": + case "y": + return GetLetterY(); + case "Z": + case "z": + return GetLetterZ(); + + + default: return "nepodporovane pismenko"; + } +} + + + + + + +string GetLetterA() +{ + return @" + ____ +/ _ \ +| / \| +| |-|| +\_/ \| "; + + +} + + +string GetLetterB() +{ + + return @"; + ____ +/ _ \ +| | // +| | _\\ +\____ / "; + +} + +string GetLetterC() +{ + return @" + ____ +/ _\ +| / +| \_ +\____/ " +; +} + +string GetLetterD() +{ +return @"; + + ____ +/ _ \ +| | \| +| | _ /| +\____ / "; + +} + + +string GetLetterE() +{ + return @"; + _____ +/ __/ +| \ +| /_ +\____\ "; + +} + +string GetletterF() +{ + return @"; + _____ +/ / +| __\ +| | +\_/ "; + + +} + +string GetLetterG() +{ + return @": + _____ +/ __/ +| | _ +| |_// +\____\ "; + + +} + +string GetLetterH() +{ + return @" + _ +/ \ /| +| |_|| +| | || +\_/ \| "; + +} + +string GetLetterI() +{ + return @": + _ +/ \ +| | +| | +\_/ "; + + +} + +string GetLetterJ() +{ + return @": + _ + / | + | | +/\_| | +\____/ "; + +} + +string GetLetterK() +{ + return @": + _ __ +/ |/ / +| / +| \ +\_|\_\ "; + +} + +string GetLetterL() +{ + return @": + _ +/ \ +| | +| |_/\ +\____/ "; + + +} + +string GetLetterM() +{ + return @": + _ +/ \__/| +| |\/|| +| | || +\_/ \| "; + + +} + +string GetLetterN() +{ + return @": + _ +/ \ /| +| |\ || +| | \|| +\_/ \| "; + + +} + +string GetLetterO() +{ + return @": + ____ +/ _ \ +| / \| +| \_/| +\____/ "; + +} + +string GetLetterP() +{ + return @": + ____ +/ __\ +| \/| +| __/ +\_/ "; + +} + +string GetLetterQ() +{ + return @": + ____ +/ _ \ +| / \| +| \_\| +\____\"; + +} + +string GetLetteR() +{ + return @": + ____ +/ __\ +| \/| +| / +\_/\_\ "; + +} + +string GetLetterS() +{ + return @": + ____ +/ ___\ +| \ +\___ | +\____/ "; + +} + +string GetLetterT() +{ + return @": + _____ +/__ __\ + / \ + | | + \_/ "; + +} + +string GetLetterU() +{ + return @": + _ +/ \ /\ +| | || +| \_/| +\____/ "; + +} + +string GetLetterV() +{ + return @": + _ +/ \ |\ +| | // +| \// +\__/ "; + +} + +string GetLetterW() +{ + return @": + _ +/ \ /| +| | || +| |/\|| +\_/ \| "; + + +} + +string GetLetterX() +{ + return @": +___ _ +\ \// + \ / + / \ +/__/\\ "; + + +} + +string GetLetterY() +{ + return @": +___ _ +\ \// + \ / + / / +/_/ "; + + +} + +string GetLetterZ() +{ + return @": + ____ +/_ \ + / / +/ /_ +\____/ "; + +} \ No newline at end of file diff --git a/grafity/grafity.csproj b/grafity/grafity.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/grafity/grafity.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/hviezdicky/Program.cs b/hviezdicky/Program.cs index 553f9897..1de1cf07 100644 --- a/hviezdicky/Program.cs +++ b/hviezdicky/Program.cs @@ -16,21 +16,21 @@ -string i = ("77"); -Console.WriteLine(i); -while (int.Parse(i) < 88) -{ - i=(int.Parse(i) + 1).ToString(); - Console.WriteLine(i); -} -int[] numbers = new int[10] { 11, 50, 48, 49, 6, 5, 7, 1, 18, 11 }; - -int vysledok = 0; -for (int i = 0; i < numbers.Length; i++) -{ - vysledok += numbers[i]; -} -Console.WriteLine(vysledok); +//string cislo = ("77"); +//Console.WriteLine(cislo); +//while (int.Parse(cislo) < 88) +//{ +// cislo=(int.Parse(cislo) + 1).ToString(); +// Console.WriteLine(cislo); +//} +//int[] numbers = new int[10] { 11, 50, 48, 49, 6, 5, 7, 1, 18, 11 }; + +//int vysledok = 0; +//for (int i = 0; i < numbers.Length; i++) +//{ +// vysledok += numbers[i]; +//} +//Console.WriteLine(vysledok); diff --git a/sompicisro/Program.cs b/sompicisro/Program.cs index 2e149b58..e8582bab 100644 --- a/sompicisro/Program.cs +++ b/sompicisro/Program.cs @@ -1,19 +1,19 @@ -List numbers = new List(); -Console.WriteLine("zadaj cislo"); -string vstup = Console.ReadLine(); -while (vstup != "+") -{ - numbers.Add(int.Parse(vstup)); - Console.WriteLine("zadaj cislo"); - vstup = Console.ReadLine(); -}/Console.WriteLine("vysledok scitania:"); -int sucet = 0; -foreach (int i in numbers) -{ - sucet += i; -} -Console.WriteLine(sucet); -numbers.Add(int.Parse(vstup)); -Console.WriteLine($"Do zoznamu si pridal cislo {vstup}"); +//List numbers = new List(); +//Console.WriteLine("zadaj cislo"); +//string vstup = Console.ReadLine(); +//while (vstup != "+") +//{ +// numbers.Add(int.Parse(vstup)); +// Console.WriteLine("zadaj cislo"); +// vstup = Console.ReadLine(); +//}Console.WriteLine("vysledok scitania:"); +//int sucet = 0; +//foreach (int i in numbers) +//{ +// sucet += i; +//} +//Console.WriteLine(sucet); +//numbers.Add(int.Parse(vstup)); +//Console.WriteLine($"Do zoznamu si pridal cislo {vstup}"); diff --git a/src/AppsLab-008-ConsoleReadLine/Program.cs b/src/AppsLab-008-ConsoleReadLine/Program.cs index 91a91929..55ad663d 100644 --- a/src/AppsLab-008-ConsoleReadLine/Program.cs +++ b/src/AppsLab-008-ConsoleReadLine/Program.cs @@ -91,26 +91,26 @@ //} -string meno = ZiskajMeno(); -string vek = ZiskajVek(); - -Console.WriteLine($"Ahoj {meno}.Tvoj vek je {vek} rokov"); - -string ZiskajMeno() -{ - Console.WriteLine("Zadaj meno"); - string meno = Console.ReadLine(); - return meno; -} -string ZiskajVek() -{ - Console.WriteLine("Zadaj vej"); - string vek = Console.ReadLine(); - return vek; - -} -void VypisUdaje(string meno, string vek) -{ - Console.WriteLine($"Ahoj {meno}. Tvoj vek je {vek} rokov"); -} +//string meno = ZiskajMeno(); +//string vek = ZiskajVek(); + +//Console.WriteLine($"Ahoj {meno}.Tvoj vek je {vek} rokov"); + +//string ZiskajMeno() +//{ +// Console.WriteLine("Zadaj meno"); +// string meno = Console.ReadLine(); +// return meno; +//} +//string ZiskajVek() +//{ +// Console.WriteLine("Zadaj vej"); +// string vek = Console.ReadLine(); +// return vek; + +//} +//void VypisUdaje(string meno, string vek) +//{ +// Console.WriteLine($"Ahoj {meno}. Tvoj vek je {vek} rokov"); +//} diff --git a/src/AppsLab-016-Loops/WeatherStats.cs b/src/AppsLab-016-Loops/WeatherStats.cs index 07b59597..520e9da5 100644 --- a/src/AppsLab-016-Loops/WeatherStats.cs +++ b/src/AppsLab-016-Loops/WeatherStats.cs @@ -14,12 +14,12 @@ public class WeatherStats /// Average temperature. public double AverageTemperature(double[] temperatures) { - double average = 0; + double average = 0; foreach (var temperature in temperatures) - { - average += temperature; + { + average += temperature; } - average/= temperatures.Length; + average /= temperatures.Length; return average; } @@ -34,13 +34,14 @@ public double MaxTemperature(double[] temperatures) foreach (double temperature in temperatures) { if (temperature > maximum) - { + { - maximum = temperature; + maximum = temperature; } } return maximum; } +} /// /// Find the minimum temperature from the provided values. diff --git a/ulohy z 22.10/Program.cs b/ulohy z 22.10/Program.cs new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/ulohy z 22.10/Program.cs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ulohy z 22.10/ulohy z 22.10..csproj b/ulohy z 22.10/ulohy z 22.10..csproj new file mode 100644 index 00000000..726fcfd5 --- /dev/null +++ b/ulohy z 22.10/ulohy z 22.10..csproj @@ -0,0 +1,11 @@ + + + + Exe + net7.0 + ulohy_z_22._10_ + enable + enable + + + From 588066c8e5eca5fa581fe285d5c598a60ae79dec Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 29 Oct 2025 13:06:43 +0100 Subject: [PATCH 13/16] 29.10 --- 29.10 2025/29.10 2025.csproj | 11 ++++++ 29.10 2025/Class1.cs | 29 +++++++++++++++ 29.10 2025/Monster.cs | 32 +++++++++++++++++ 29.10 2025/Program.cs | 13 +++++++ AppsLab.CSharp.Exercises.sln | 32 +++++++++++++++-- NEviem vobec/NEviem vobec.csproj | 11 ++++++ NEviem vobec/Program.cs | 55 +++++++++++++++++++++++++++++ grafity/Program.cs | 3 -- src/AppsLab-001-StartHere/Player.cs | 12 +++++++ ulohy z 22.10/Animal.cs | 20 +++++++++++ ulohy z 22.10/Program.cs | 10 +++++- 11 files changed, 222 insertions(+), 6 deletions(-) create mode 100644 29.10 2025/29.10 2025.csproj create mode 100644 29.10 2025/Class1.cs create mode 100644 29.10 2025/Monster.cs create mode 100644 29.10 2025/Program.cs create mode 100644 NEviem vobec/NEviem vobec.csproj create mode 100644 NEviem vobec/Program.cs create mode 100644 src/AppsLab-001-StartHere/Player.cs create mode 100644 ulohy z 22.10/Animal.cs diff --git a/29.10 2025/29.10 2025.csproj b/29.10 2025/29.10 2025.csproj new file mode 100644 index 00000000..b58f99ed --- /dev/null +++ b/29.10 2025/29.10 2025.csproj @@ -0,0 +1,11 @@ + + + + Exe + net7.0 + _29._10_2025 + enable + enable + + + diff --git a/29.10 2025/Class1.cs b/29.10 2025/Class1.cs new file mode 100644 index 00000000..1c2676d7 --- /dev/null +++ b/29.10 2025/Class1.cs @@ -0,0 +1,29 @@ + +namespace _29._10_2025 +{ + public class Player + { + private string Name; + private const int maxHP = 100; + private const int minHP = 0; + private int curentHP = maxHP; + private int playerDamage = 20; + private List invetory = new List(); + + + public bool DealDamage(Monster opponent) + { + opponent.TakeDamage(playerDamage); + return true; + + } + internal void SetName(string? playerName) + { + Name = playerName; + } + internal void TakeDamage(int monsterDamage) + { + curentHP = monsterDamage; + } + } +} diff --git a/29.10 2025/Monster.cs b/29.10 2025/Monster.cs new file mode 100644 index 00000000..c712b9b0 --- /dev/null +++ b/29.10 2025/Monster.cs @@ -0,0 +1,32 @@ +using _29._10_2025; +using System.ComponentModel; + +namespace _29._10_2025 +{ + public class Monster + { + private const int maxHP = 200; + private const int minHP = 0; + private int curentHP = maxHP; + private int monsterDamage = 1; + + + + internal void TakeDamage(int damage) + { + + curentHP -= damage; + } + + public bool TakeDamage(Player opponent) + { + opponent.TakeDamage(monsterDamage); + return true; + } + + internal static void DealDamage(Player player) + { + throw new NotImplementedException(); + } + } +} diff --git a/29.10 2025/Program.cs b/29.10 2025/Program.cs new file mode 100644 index 00000000..1d019c96 --- /dev/null +++ b/29.10 2025/Program.cs @@ -0,0 +1,13 @@ + +using _29._10_2025; +Console.WriteLine("Zadaj meno hracovy"); +string playerName = Console.ReadLine(); +Player player = new Player(); +player.SetName(playerName); +Monster monster = new Monster(); + +player.DealDamage(monster); +Monster.DealDamage(player); + +Console.WriteLine(); + diff --git a/AppsLab.CSharp.Exercises.sln b/AppsLab.CSharp.Exercises.sln index 3b4668e3..c76835d2 100644 --- a/AppsLab.CSharp.Exercises.sln +++ b/AppsLab.CSharp.Exercises.sln @@ -105,9 +105,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "hviezdicky", "hviezdicky\hv EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sompicisro", "sompicisro\sompicisro.csproj", "{F49B8C2A-D804-44DA-83D5-6D5C32776099}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ulohy z 22.10.", "ulohy z 22.10\ulohy z 22.10..csproj", "{923DCDA4-D9EB-4F48-819A-35A9F084CD82}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ulohy z 22.10.", "ulohy z 22.10\ulohy z 22.10..csproj", "{923DCDA4-D9EB-4F48-819A-35A9F084CD82}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "grafity", "grafity\grafity.csproj", "{07A43EA7-6415-4F24-BEB3-EFAA99783624}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "grafity", "grafity\grafity.csproj", "{07A43EA7-6415-4F24-BEB3-EFAA99783624}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "29.10 2025", "29.10 2025\29.10 2025.csproj", "{02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NEviem vobec", "NEviem vobec\NEviem vobec.csproj", "{F25E0A0D-919E-4205-8C6E-C72A516DC932}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -731,6 +735,30 @@ Global {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x64.Build.0 = Release|Any CPU {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x86.ActiveCfg = Release|Any CPU {07A43EA7-6415-4F24-BEB3-EFAA99783624}.Release|x86.Build.0 = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|x64.ActiveCfg = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|x64.Build.0 = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|x86.ActiveCfg = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Debug|x86.Build.0 = Debug|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|Any CPU.Build.0 = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|x64.ActiveCfg = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|x64.Build.0 = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|x86.ActiveCfg = Release|Any CPU + {02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}.Release|x86.Build.0 = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|x64.ActiveCfg = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|x64.Build.0 = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|x86.ActiveCfg = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Debug|x86.Build.0 = Debug|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|Any CPU.Build.0 = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x64.ActiveCfg = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x64.Build.0 = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x86.ActiveCfg = Release|Any CPU + {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NEviem vobec/NEviem vobec.csproj b/NEviem vobec/NEviem vobec.csproj new file mode 100644 index 00000000..9c925252 --- /dev/null +++ b/NEviem vobec/NEviem vobec.csproj @@ -0,0 +1,11 @@ + + + + Exe + net7.0 + NEviem_vobec + enable + enable + + + diff --git a/NEviem vobec/Program.cs b/NEviem vobec/Program.cs new file mode 100644 index 00000000..77d0ddfb --- /dev/null +++ b/NEviem vobec/Program.cs @@ -0,0 +1,55 @@ + + + + +using System; +namespace student +{ + public class Student + { + public int Age = 22; + public string name = "Rudolf"; + } + class program + { + static void Main(string[] args) + { + Student student = new Student(); + if (student.Age > 18) + { + Console.WriteLine("rudolf moze pit alkohol"); + + } + else + { + Console.WriteLine("rudolf este alkohol legane pit nemoze"); + } + + + + } + } +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/grafity/Program.cs b/grafity/Program.cs index 2b7aae2b..0fcb65b5 100644 --- a/grafity/Program.cs +++ b/grafity/Program.cs @@ -126,9 +126,6 @@ string GetLetter(string input) - - - string GetLetterA() { return @" diff --git a/src/AppsLab-001-StartHere/Player.cs b/src/AppsLab-001-StartHere/Player.cs new file mode 100644 index 00000000..6913c723 --- /dev/null +++ b/src/AppsLab-001-StartHere/Player.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AppsLab_001_StartHere +{ + internal class Player + { + } +} diff --git a/ulohy z 22.10/Animal.cs b/ulohy z 22.10/Animal.cs new file mode 100644 index 00000000..86d8a460 --- /dev/null +++ b/ulohy z 22.10/Animal.cs @@ -0,0 +1,20 @@ + +internal class Animal +{ + public bool bylinozravec = false; + public void setfood(bool SiBylinozravec) + { + bylinozravec = SiBylinozravec; + } + public bool CanEatOtherAnimal() + { + if (bylinozravec == true) + { + return false; + } + else + { + return true; + } + } +} \ No newline at end of file diff --git a/ulohy z 22.10/Program.cs b/ulohy z 22.10/Program.cs index 5f282702..d4da8e0e 100644 --- a/ulohy z 22.10/Program.cs +++ b/ulohy z 22.10/Program.cs @@ -1 +1,9 @@ - \ No newline at end of file +Animal bylinozravec = new Animal(); +bylinozravec.setfood(true); +Animal masozravec = new Animal(); +masozravec.setfood(false); +bylinozravec.CanEatOtherAnimal(); +bool MozeBylinozravecJest = bylinozravec.CanEatOtherAnimal(); +bool MozeMasozravecJest = masozravec.CanEatOtherAnimal(); +Console.WriteLine($"bylinozravec{MozeBylinozravecJest}"); +Console.WriteLine($"masozravec{MozeMasozravecJest}"); From 0f68ac37f8d494eaefd5fb70a7cbe8ac7d7d8841 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 5 Nov 2025 07:43:50 +0100 Subject: [PATCH 14/16] alkohol --- NEviem vobec/Program.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/NEviem vobec/Program.cs b/NEviem vobec/Program.cs index 77d0ddfb..300ede9b 100644 --- a/NEviem vobec/Program.cs +++ b/NEviem vobec/Program.cs @@ -1,7 +1,4 @@  - - - using System; namespace student { From b563cf6e9a540b66b4da06b49ca832a1e4823f0e Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 5 Nov 2025 13:08:34 +0100 Subject: [PATCH 15/16] heslo --- AppsLab.CSharp.Exercises.sln | 18 ++++++++++++++++-- animal/Program.cs | 2 ++ animal/animal.csproj | 10 ++++++++++ .../PasswordGenerator.cs | 14 +++++++++++--- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 animal/Program.cs create mode 100644 animal/animal.csproj diff --git a/AppsLab.CSharp.Exercises.sln b/AppsLab.CSharp.Exercises.sln index c76835d2..2930af81 100644 --- a/AppsLab.CSharp.Exercises.sln +++ b/AppsLab.CSharp.Exercises.sln @@ -109,9 +109,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ulohy z 22.10.", "ulohy z 2 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "grafity", "grafity\grafity.csproj", "{07A43EA7-6415-4F24-BEB3-EFAA99783624}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "29.10 2025", "29.10 2025\29.10 2025.csproj", "{02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "29.10 2025", "29.10 2025\29.10 2025.csproj", "{02C4C54B-9DD4-422D-98F2-E5DBCACEAEAF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NEviem vobec", "NEviem vobec\NEviem vobec.csproj", "{F25E0A0D-919E-4205-8C6E-C72A516DC932}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NEviem vobec", "NEviem vobec\NEviem vobec.csproj", "{F25E0A0D-919E-4205-8C6E-C72A516DC932}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "animal", "animal\animal.csproj", "{11E6C236-AAB0-4895-A2EE-88A4680A354A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -759,6 +761,18 @@ Global {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x64.Build.0 = Release|Any CPU {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x86.ActiveCfg = Release|Any CPU {F25E0A0D-919E-4205-8C6E-C72A516DC932}.Release|x86.Build.0 = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|x64.ActiveCfg = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|x64.Build.0 = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|x86.ActiveCfg = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Debug|x86.Build.0 = Debug|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|Any CPU.Build.0 = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|x64.ActiveCfg = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|x64.Build.0 = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|x86.ActiveCfg = Release|Any CPU + {11E6C236-AAB0-4895-A2EE-88A4680A354A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/animal/Program.cs b/animal/Program.cs new file mode 100644 index 00000000..dc756b47 --- /dev/null +++ b/animal/Program.cs @@ -0,0 +1,2 @@ + +Console.WriteLine("chod mi do pice"); diff --git a/animal/animal.csproj b/animal/animal.csproj new file mode 100644 index 00000000..f02677bf --- /dev/null +++ b/animal/animal.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs b/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs index b48403a4..06d5d19f 100644 --- a/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs +++ b/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs @@ -17,8 +17,8 @@ public class PasswordGenerator /// /// A randomly generated password. public string GeneratePassword() - { - throw new NotImplementedException(); + { + return GeneratePassword(DefaultLength); } /// @@ -28,7 +28,15 @@ public string GeneratePassword() /// A randomly generated password. public string GeneratePassword(int length) { - throw new NotImplementedException(); + + string password = ""; + for (int i = 0; i From d3eafc002055e6814bda54784e2f4924a39e4d62 Mon Sep 17 00:00:00 2001 From: kubiszr25 Date: Wed, 5 Nov 2025 13:08:58 +0100 Subject: [PATCH 16/16] heslo --- src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs b/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs index 06d5d19f..7dbdd0b8 100644 --- a/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs +++ b/src/AppsLab-019-MethodsOverloading/PasswordGenerator.cs @@ -48,7 +48,7 @@ public string GeneratePassword(int length) /// A randomly generated password. public string GeneratePassword(int length, bool includeSpecialChars, bool includeNumbers) { - throw new NotImplementedException(); + throw new NotImplementedException(); } } } \ No newline at end of file