diff --git a/20240925/Bejelentes/.vs/Bejelentes/FileContentIndex/0958d5c7-d044-4577-8f38-cda7b81f838b.vsidx b/20240925/Bejelentes/.vs/Bejelentes/FileContentIndex/0958d5c7-d044-4577-8f38-cda7b81f838b.vsidx new file mode 100644 index 0000000..4e29b1d Binary files /dev/null and b/20240925/Bejelentes/.vs/Bejelentes/FileContentIndex/0958d5c7-d044-4577-8f38-cda7b81f838b.vsidx differ diff --git a/20240925/Bejelentes/.vs/Bejelentes/v17/.suo b/20240925/Bejelentes/.vs/Bejelentes/v17/.suo new file mode 100644 index 0000000..1f74ad5 Binary files /dev/null and b/20240925/Bejelentes/.vs/Bejelentes/v17/.suo differ diff --git a/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.backup.json b/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..3041ce8 --- /dev/null +++ b/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}|Bejelentes\\Bejelentes.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240925\\bejelentes\\bejelentes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}|Bejelentes\\Bejelentes.csproj|solutionrelative:bejelentes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\Bejelentes\\Program.cs", + "RelativeDocumentMoniker": "Bejelentes\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\Bejelentes\\Program.cs", + "RelativeToolTip": "Bejelentes\\Program.cs", + "ViewState": "AgIAAFAAAAAAAAAAAAAcwF0AAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-09-25T10:09:45.632Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.json b/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.json new file mode 100644 index 0000000..3041ce8 --- /dev/null +++ b/20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}|Bejelentes\\Bejelentes.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240925\\bejelentes\\bejelentes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}|Bejelentes\\Bejelentes.csproj|solutionrelative:bejelentes\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\Bejelentes\\Program.cs", + "RelativeDocumentMoniker": "Bejelentes\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\Bejelentes\\Bejelentes\\Program.cs", + "RelativeToolTip": "Bejelentes\\Program.cs", + "ViewState": "AgIAAFAAAAAAAAAAAAAcwF0AAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-09-25T10:09:45.632Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20240925/Bejelentes/Bejelentes.sln b/20240925/Bejelentes/Bejelentes.sln new file mode 100644 index 0000000..3dbed67 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bejelentes", "Bejelentes\Bejelentes.csproj", "{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C08961FD-222F-4556-822E-36468238DE52} + EndGlobalSection +EndGlobal diff --git a/20240925/Bejelentes/Bejelentes/App.config b/20240925/Bejelentes/Bejelentes/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240925/Bejelentes/Bejelentes/Bejelentes.csproj b/20240925/Bejelentes/Bejelentes/Bejelentes.csproj new file mode 100644 index 0000000..56deaf5 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/Bejelentes.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {2FDC7F8B-372B-4BC7-9971-6FE3E62849B0} + Exe + Bejelentes + Bejelentes + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/20240925/Bejelentes/Bejelentes/Program.cs b/20240925/Bejelentes/Bejelentes/Program.cs new file mode 100644 index 0000000..3f7b1dc --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/Program.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bejelentes +{ + public class Bejelentes + { + public DateTime idopont; + public string prioritas; + public string stausz; + + public Bejelentes(DateTime Idopont, string Prioritas, string Statusz) { + idopont = Idopont; + prioritas = Prioritas; + stausz = Statusz; + } + } + + public static class Data + { + public static List Bejelentesek = new List(); + } + internal class Program + { + static void Main(string[] args) + { + string path = "bejelentes.csv"; + DataRead(path); + AFeladat(); + BFeladat(); + CFeladat(); + Console.ReadLine(); + } + + public static void BFeladat() + { + int megoldott = (from elem in Data.Bejelentesek + where elem.stausz == "Megoldott" + select elem).Count(); + + int fuggoben = (from elem in Data.Bejelentesek + where elem.stausz == "Függőben" + select elem).Count(); + + Console.WriteLine($"Megoldottak száma: {megoldott}"); + Console.WriteLine($"Függőben lévők száma: {fuggoben}"); + + } + + + + public static void CFeladat() + { + Bejelentes legregebbi_fuggo = Data.Bejelentesek.OrderBy(x => x.idopont).Where(x => x.stausz == "Függőben").Take(1).ToList()[0]; + Console.WriteLine($"A legrégebbi függőben lévő jegy: {legregebbi_fuggo.idopont},{legregebbi_fuggo.prioritas},{legregebbi_fuggo.stausz}"); + + Bejelentes leghamarabb_megoldott = Data.Bejelentesek.OrderBy(x => x.idopont).Where(x => x.stausz == "Megoldott").Take(1).ToList()[0]; + Console.WriteLine($"A leghamarabb megoldott probléma: {leghamarabb_megoldott.idopont},{leghamarabb_megoldott.prioritas}, {leghamarabb_megoldott.stausz}"); + } + + public static void AFeladat() + { + int magas = Data.Bejelentesek.Where(x=>x.prioritas == "Magas").Count(); + int kozepes = Data.Bejelentesek.Where(x => x.prioritas == "Közepes").Count(); + int alacsony = Data.Bejelentesek.Where(x => x.prioritas == "Alacsony").Count(); + + Console.WriteLine($"Az alacsony prioritásúak száma: {alacsony}"); + Console.WriteLine($"A közepes prioritásúak száma: {kozepes}"); + Console.WriteLine($"A magas prioritásúak száma: {magas}"); + + } + + public static void DataRead(string path) + { + using (StreamReader streamReader = new StreamReader(path)) + { + string line = streamReader.ReadLine(); + line = streamReader.ReadLine(); + + while (line != null) + { + string[] strings = line.Split(';'); + DateTime idopont = Convert.ToDateTime(strings[0]); + Bejelentes bejelentes = new Bejelentes(idopont, strings[1], strings[2]); + Data.Bejelentesek.Add(bejelentes); + line = streamReader.ReadLine(); + } + + streamReader.Close(); + } + } + } +} diff --git a/20240925/Bejelentes/Bejelentes/Properties/AssemblyInfo.cs b/20240925/Bejelentes/Bejelentes/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f0aff03 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Bejelentes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Bejelentes")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2fdc7f8b-372b-4bc7-9971-6fe3e62849b0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe new file mode 100644 index 0000000..12ac09e Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe differ diff --git a/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe.config b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.pdb b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.pdb new file mode 100644 index 0000000..7e0adaf Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.pdb differ diff --git a/20240925/Bejelentes/Bejelentes/bin/Debug/bejelentes.csv b/20240925/Bejelentes/Bejelentes/bin/Debug/bejelentes.csv new file mode 100644 index 0000000..d181519 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/bin/Debug/bejelentes.csv @@ -0,0 +1,16 @@ +Időpont;Prioritás;Státusz +2024.01.01 8:45;Magas;Megoldott +2024.01.01 10:12;Közepes;Függőben +2024.01.01 11:20;Alacsony;Megoldott +2024.01.02 9:30;Magas;Függőben +2024.01.02 11:45;Közepes;Függőben +2024.01.03 12:15;Alacsony;Függőben +2024.01.03 14:00;Magas;Megoldott +2024.01.04 16:30;Közepes;Megoldott +2024.02.10 10:45;Magas;Függőben +2024.02.11 12:20;Alacsony;Függőben +2024.02.12 9:50;Közepes;Megoldott +2024.02.13 11:40;Magas;Függőben +2024.02.14 14:30;Alacsony;Függőben +2024.02.15 8:15;Közepes;Megoldott +2024.02.16 15:00;Magas;Függőben diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20240925/Bejelentes/Bejelentes/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.AssemblyReference.cache b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.AssemblyReference.cache differ diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.CoreCompileInputs.cache b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.FileListAbsolute.txt b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..73eec5b --- /dev/null +++ b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\bin\Debug\Bejelentes.exe.config +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\bin\Debug\Bejelentes.exe +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\bin\Debug\Bejelentes.pdb +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\obj\Debug\Bejelentes.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\obj\Debug\Bejelentes.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\obj\Debug\Bejelentes.exe +C:\Users\szabomarton\Desktop\ProgaOra\20240925\Bejelentes\Bejelentes\obj\Debug\Bejelentes.pdb diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.exe b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.exe new file mode 100644 index 0000000..12ac09e Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.exe differ diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.pdb b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.pdb new file mode 100644 index 0000000..7e0adaf Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.pdb differ diff --git a/20240925/Bejelentes/Bejelentes/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240925/Bejelentes/Bejelentes/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..530f96e Binary files /dev/null and b/20240925/Bejelentes/Bejelentes/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240925/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5253fbca-4a5f-417e-9924-c95d9100015f.vsidx b/20240925/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5253fbca-4a5f-417e-9924-c95d9100015f.vsidx new file mode 100644 index 0000000..5430fd9 Binary files /dev/null and b/20240925/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/5253fbca-4a5f-417e-9924-c95d9100015f.vsidx differ diff --git a/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/.suo b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/.suo new file mode 100644 index 0000000..38e4fa9 Binary files /dev/null and b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/.suo differ diff --git a/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..22c2597 --- /dev/null +++ b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240925\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAB8AAAAAAAAAAAAAAB8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-09-25T09:45:22.518Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json new file mode 100644 index 0000000..eb539bc --- /dev/null +++ b/20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20240925\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAEQAAAAAAAAAAAAYwFsAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-09-25T09:45:22.518Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20240925/ConsoleApp1/ConsoleApp1.sln b/20240925/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..94fcd02 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {524E68F2-2E7F-458C-AC61-0C5CF75CEE3A} + EndGlobalSection +EndGlobal diff --git a/20240925/ConsoleApp1/ConsoleApp1/App.config b/20240925/ConsoleApp1/ConsoleApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240925/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/20240925/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..b570a88 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8} + Exe + ConsoleApp1 + ConsoleApp1 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/20240925/ConsoleApp1/ConsoleApp1/Program.cs b/20240925/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..9b4d0c1 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.ComponentModel; + +namespace ConsoleApp1 +{ + public static class Data + { + public static List Konyvek = new List(); + } + public class Konyv + { + public string cim; + public string szerzo; + public int ar; + public Konyv(string Cim, string Szerzo, int Ar) { + cim = Cim; + szerzo = Szerzo; + ar = Ar; + } + } + internal class Program + { + static void Main(string[] args) + { + string filepath = "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20240925\\konyvek.csv"; + DataRead(filepath); + AFeladat(); + BFeladat(); + CFeladat(); + + } + + public static void CFeladat() + { + List legdragabbak = Legdragabbak(Data.Konyvek); + Console.WriteLine("A legdrágább könyvek a következők:"); + foreach (var item in legdragabbak) + { + Console.WriteLine($"\t{item.cim}, {item.ar}"); + } + } + + public static List Legdragabbak(List konyvek) + { + return konyvek.OrderByDescending(x => x.ar).Take(5).ToList(); + } + + public static void BFeladat() + { + int num = Ketezerfelettiek(Data.Konyvek); + Console.WriteLine($"A kétezer forint fölötti könyvek száma: {num}"); + } + + public static int Ketezerfelettiek(List konyvek) + { + return konyvek.Where(x => x.ar > 2000).Count(); + } + + public static void AFeladat() + { + Console.WriteLine("A könyvtár tartalma: "); + foreach (var item in Data.Konyvek) + { + Console.WriteLine($"\t{item.cim}, {item.szerzo}, {item.ar}"); + } + } + + + public static void DataRead(string path) + { + using (StreamReader streamReader = new StreamReader(path)) + { + string line = streamReader.ReadLine(); + line = streamReader.ReadLine(); + + while (line != null) + { + string[] strings = line.Split(';'); + int ar = Int32.Parse(strings[2]); + Konyv konyv = new Konyv(strings[0], strings[1], ar); + Data.Konyvek.Add(konyv); + line = streamReader.ReadLine(); + } + + streamReader.Close(); + } + } + } +} diff --git a/20240925/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs b/20240925/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d0fc4d9 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4e5245c6-30fa-4cb2-8fe6-e1e8d8df07a8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..fc58b41 Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe differ diff --git a/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..88cb44a Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb differ diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache differ diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5063beb --- /dev/null +++ b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20240925\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..fc58b41 Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe differ diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..88cb44a Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb differ diff --git a/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2c33058 Binary files /dev/null and b/20240925/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240925/konyvek.csv b/20240925/konyvek.csv new file mode 100644 index 0000000..a54e2cd --- /dev/null +++ b/20240925/konyvek.csv @@ -0,0 +1,17 @@ +Cím;Szerző;Ár +Az arany ember;Jókai Mór;1000 +Egri csillagok;Gárdonyi Géza;1500 +Pál utcai fiúk;Molnár Ferenc;2000 +Tüskevár;Fekete István;2500 +A kőszívű ember fiai;Jókai Mór;3000 +Légy jó mindhalálig;Móricz Zsigmond;1200 +Sorstalanság;Kertész Imre;1800 +Ábel a rengetegben;Tamási Áron;2200 +Rokonok;Móricz Zsigmond;2400 +Az ötödik pecsét;Sánta Ferenc;1400 +Idő van;Örkény István;1600 +A Pál utcai fiúk;Molnár Ferenc;1900 +Csillagok háborúja;Lucas George;2500 +1984;Orwell George;2600 +Száz év magány;Garcia Marquez;2800 +Harry Potter és a bölcsek köve;Rowling J.K.;3500