added Dolgozat
This commit is contained in:
parent
6bc4e13d38
commit
ae4801ec45
Binary file not shown.
BIN
20240925/Bejelentes/.vs/Bejelentes/v17/.suo
Normal file
BIN
20240925/Bejelentes/.vs/Bejelentes/v17/.suo
Normal file
Binary file not shown.
|
@ -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": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
37
20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.json
Normal file
37
20240925/Bejelentes/.vs/Bejelentes/v17/DocumentLayout.json
Normal file
|
@ -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": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
25
20240925/Bejelentes/Bejelentes.sln
Normal file
25
20240925/Bejelentes/Bejelentes.sln
Normal file
|
@ -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
|
6
20240925/Bejelentes/Bejelentes/App.config
Normal file
6
20240925/Bejelentes/Bejelentes/App.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
53
20240925/Bejelentes/Bejelentes/Bejelentes.csproj
Normal file
53
20240925/Bejelentes/Bejelentes/Bejelentes.csproj
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{2FDC7F8B-372B-4BC7-9971-6FE3E62849B0}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>Bejelentes</RootNamespace>
|
||||||
|
<AssemblyName>Bejelentes</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
97
20240925/Bejelentes/Bejelentes/Program.cs
Normal file
97
20240925/Bejelentes/Bejelentes/Program.cs
Normal file
|
@ -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<Bejelentes> Bejelentesek = new List<Bejelentes>();
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
20240925/Bejelentes/Bejelentes/Properties/AssemblyInfo.cs
Normal file
33
20240925/Bejelentes/Bejelentes/Properties/AssemblyInfo.cs
Normal file
|
@ -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")]
|
BIN
20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe
Normal file
BIN
20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.exe
Normal file
Binary file not shown.
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
BIN
20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.pdb
Normal file
BIN
20240925/Bejelentes/Bejelentes/bin/Debug/Bejelentes.pdb
Normal file
Binary file not shown.
16
20240925/Bejelentes/Bejelentes/bin/Debug/bejelentes.csv
Normal file
16
20240925/Bejelentes/Bejelentes/bin/Debug/bejelentes.csv
Normal file
|
@ -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
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509
|
|
@ -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
|
BIN
20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.exe
Normal file
BIN
20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.exe
Normal file
Binary file not shown.
BIN
20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.pdb
Normal file
BIN
20240925/Bejelentes/Bejelentes/obj/Debug/Bejelentes.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
20240925/ConsoleApp1/.vs/ConsoleApp1/v17/.suo
Normal file
BIN
20240925/ConsoleApp1/.vs/ConsoleApp1/v17/.suo
Normal file
Binary file not shown.
|
@ -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": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
37
20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json
Normal file
37
20240925/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json
Normal file
|
@ -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": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
25
20240925/ConsoleApp1/ConsoleApp1.sln
Normal file
25
20240925/ConsoleApp1/ConsoleApp1.sln
Normal file
|
@ -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
|
6
20240925/ConsoleApp1/ConsoleApp1/App.config
Normal file
6
20240925/ConsoleApp1/ConsoleApp1/App.config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
53
20240925/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj
Normal file
53
20240925/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{4E5245C6-30FA-4CB2-8FE6-E1E8D8DF07A8}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>ConsoleApp1</RootNamespace>
|
||||||
|
<AssemblyName>ConsoleApp1</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
94
20240925/ConsoleApp1/ConsoleApp1/Program.cs
Normal file
94
20240925/ConsoleApp1/ConsoleApp1/Program.cs
Normal file
|
@ -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<Konyv> Konyvek = new List<Konyv>();
|
||||||
|
}
|
||||||
|
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<Konyv> 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<Konyv> Legdragabbak(List<Konyv> 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<Konyv> 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
20240925/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs
Normal file
33
20240925/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs
Normal file
|
@ -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")]
|
BIN
20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe
Normal file
BIN
20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe
Normal file
Binary file not shown.
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
BIN
20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb
Normal file
BIN
20240925/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb
Normal file
Binary file not shown.
|
@ -0,0 +1,4 @@
|
||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509
|
|
@ -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
|
BIN
20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe
Normal file
BIN
20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe
Normal file
Binary file not shown.
BIN
20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb
Normal file
BIN
20240925/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb
Normal file
Binary file not shown.
Binary file not shown.
17
20240925/konyvek.csv
Normal file
17
20240925/konyvek.csv
Normal file
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user