Alles aus dem dritten Semester
This commit is contained in:
parent
cdcd0d8a41
commit
23600473b3
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="openjdk-22" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Hochschule.iml" filepath="$PROJECT_DIR$/Hochschule.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -7,5 +7,15 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="JUnit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13.1/junit-4.13.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@ -1,17 +1,17 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj": {}
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj",
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj",
|
||||
"projectName": "Aufgabe1",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\obj\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe1")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1c14a7a05a158696187a2f54514bc234dd4283d8")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe1")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgabe1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
0f54ee831ced8a5bb4f1204eae16849dfddbdff5c48e8c9b786196cbaa5b358d
|
||||
82cd2baef09ab11a77ee684662a48b243493f467948c214de3667dd231dcb95a
|
||||
|
@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Aufgabe1
|
||||
build_property.ProjectDir = C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt1\Aufgabenblatt1\
|
||||
build_property.ProjectDir = C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt1\Aufgabe1\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
Binary file not shown.
@ -14,11 +14,11 @@
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj",
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj",
|
||||
"projectName": "Aufgabe1",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\obj\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "34pLguQXEaY=",
|
||||
"dgSpecHash": "sF7N88sejh0=",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabenblatt1\\Aufgabe1.csproj",
|
||||
"projectFilePath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt1\\Aufgabe1\\Aufgabe1.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe2")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1c14a7a05a158696187a2f54514bc234dd4283d8")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe2")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgabe2")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
14954c32b68f429e3e27986daa5c022f9e7975a0540820c5c3270b42ba021574
|
||||
8ad995a18a5bb12f24fa488f31900bd98207d2966605e7862b6f650d182ecfe0
|
||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe3")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1c14a7a05a158696187a2f54514bc234dd4283d8")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe3")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgabe3")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
df67a7a3c9a9297433cb77f1a8294275d77e46798e48ee29ce4b01d8fd20db10
|
||||
53db133be958f603274dc38dec77bd7beb4b06ae9b27910db856f1cfbbb7fe5f
|
||||
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35312.102
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aufgabe1", "Aufgabenblatt1\Aufgabe1.csproj", "{ED34B7F4-FB35-431E-974A-98F4DE3100B8}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aufgabe1", "Aufgabe1\Aufgabe1.csproj", "{ED34B7F4-FB35-431E-974A-98F4DE3100B8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aufgabe2", "Aufgabe2\Aufgabe2.csproj", "{C6DDAD30-DE6C-4D14-8D11-C588F49D0A29}"
|
||||
EndProject
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Semester3/DotNET/Aufgabenblatt2/.vs/Aufgabenblatt2/v17/.suo
Normal file
BIN
Semester3/DotNET/Aufgabenblatt2/.vs/Aufgabenblatt2/v17/.suo
Normal file
Binary file not shown.
@ -0,0 +1,54 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{2BB8DF95-4DC4-45AA-820D-2340D2D2C08B}|Aufgabe4\\Aufgabe4.csproj|c:\\git\\hochschule\\semester3\\dotnet\\aufgabenblatt2\\aufgabe4\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{2BB8DF95-4DC4-45AA-820D-2340D2D2C08B}|Aufgabe4\\Aufgabe4.csproj|solutionrelative:aufgabe4\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E039A553-ACFF-497F-A6BF-4A66C3E649F2}|Aufgabe5\\Aufgabe5.csproj|c:\\git\\hochschule\\semester3\\dotnet\\aufgabenblatt2\\aufgabe5\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E039A553-ACFF-497F-A6BF-4A66C3E649F2}|Aufgabe5\\Aufgabe5.csproj|solutionrelative:aufgabe5\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Aufgabe5\\Program.cs",
|
||||
"ToolTip": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Program.cs*",
|
||||
"RelativeToolTip": "Aufgabe5\\Program.cs*",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAmAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-20T19:29:33.23Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Aufgabe4\\Program.cs",
|
||||
"ToolTip": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Program.cs",
|
||||
"RelativeToolTip": "Aufgabe4\\Program.cs",
|
||||
"ViewState": "AgIAAA8AAAAAAAAAAAAAABoAAAAWAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-20T19:26:32.199Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E039A553-ACFF-497F-A6BF-4A66C3E649F2}|Aufgabe5\\Aufgabe5.csproj|c:\\git\\hochschule\\semester3\\dotnet\\aufgabenblatt2\\aufgabe5\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E039A553-ACFF-497F-A6BF-4A66C3E649F2}|Aufgabe5\\Aufgabe5.csproj|solutionrelative:aufgabe5\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{2BB8DF95-4DC4-45AA-820D-2340D2D2C08B}|Aufgabe4\\Aufgabe4.csproj|c:\\git\\hochschule\\semester3\\dotnet\\aufgabenblatt2\\aufgabe4\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{2BB8DF95-4DC4-45AA-820D-2340D2D2C08B}|Aufgabe4\\Aufgabe4.csproj|solutionrelative:aufgabe4\\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:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Aufgabe5\\Program.cs",
|
||||
"ToolTip": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Program.cs",
|
||||
"RelativeToolTip": "Aufgabe5\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAWAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-20T19:29:33.23Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Aufgabe4\\Program.cs",
|
||||
"ToolTip": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Program.cs",
|
||||
"RelativeToolTip": "Aufgabe4\\Program.cs",
|
||||
"ViewState": "AgIAAAQAAAAAAAAAAAAAAAsAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-20T19:26:32.199Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe4/Aufgabe4.csproj
Normal file
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe4/Aufgabe4.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
59
Semester3/DotNET/Aufgabenblatt2/Aufgabe4/Program.cs
Normal file
59
Semester3/DotNET/Aufgabenblatt2/Aufgabe4/Program.cs
Normal file
@ -0,0 +1,59 @@
|
||||
Console.WriteLine("Willkommen zu Aufgabe4");
|
||||
|
||||
Fahrzeug[] fahrzeuge = new Fahrzeug[3];
|
||||
fahrzeuge[0] = new Fahrzeug("KA TE 4711");
|
||||
fahrzeuge[1] = new PKW("KA SC 1894");
|
||||
fahrzeuge[2] = new LKW("S OS 2342");
|
||||
|
||||
foreach (Fahrzeug fahrzeug in fahrzeuge)
|
||||
{
|
||||
Console.WriteLine(fahrzeug.Drive());
|
||||
// Mir ist bewusst, dass hier nicht die Drive Methode von LKW aufgerufen wird.
|
||||
}
|
||||
|
||||
public class Fahrzeug
|
||||
{
|
||||
public string kennzeichen { set; protected get; }
|
||||
|
||||
public Fahrzeug() { }
|
||||
|
||||
public Fahrzeug(string kennzeichen)
|
||||
{
|
||||
this.kennzeichen = kennzeichen;
|
||||
}
|
||||
|
||||
~Fahrzeug()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual string Drive()
|
||||
{
|
||||
return this.kennzeichen;
|
||||
}
|
||||
}
|
||||
|
||||
public class PKW : Fahrzeug
|
||||
{
|
||||
public PKW() { }
|
||||
public PKW(string kennzeichen) : base(kennzeichen)
|
||||
{
|
||||
}
|
||||
|
||||
public override string Drive()
|
||||
{
|
||||
return $"PKW: {base.Drive()}";
|
||||
}
|
||||
}
|
||||
|
||||
public class LKW : Fahrzeug
|
||||
{
|
||||
public LKW() { }
|
||||
public LKW(string kennzeichen) : base(kennzeichen)
|
||||
{
|
||||
}
|
||||
|
||||
public new string Drive()
|
||||
{
|
||||
return $"LKW: {this.kennzeichen}";
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Aufgabe4/1.0.0": {
|
||||
"runtime": {
|
||||
"Aufgabe4.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Aufgabe4/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net8.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj",
|
||||
"projectName": "Aufgabe4",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\cmerkens\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cmerkens\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\cmerkens\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe4")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe4")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgabe4")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
@ -0,0 +1 @@
|
||||
595b3c39889cf2f32c176c4984404e6afbdf67cc480015eba8cf8f04ca7f4f53
|
@ -0,0 +1,13 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Aufgabe4
|
||||
build_property.ProjectDir = C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
5bb53426c5fe210bf3e3dded71ecc28da65dd1c95fbbacf4fa74163416f910c3
|
@ -0,0 +1,14 @@
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\bin\Debug\net8.0\Aufgabe4.exe
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\bin\Debug\net8.0\Aufgabe4.deps.json
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\bin\Debug\net8.0\Aufgabe4.runtimeconfig.json
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\bin\Debug\net8.0\Aufgabe4.dll
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\bin\Debug\net8.0\Aufgabe4.pdb
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.AssemblyInfoInputs.cache
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.AssemblyInfo.cs
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.csproj.CoreCompileInputs.cache
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.dll
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\refint\Aufgabe4.dll
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.pdb
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\Aufgabe4.genruntimeconfig.cache
|
||||
C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe4\obj\Debug\net8.0\ref\Aufgabe4.dll
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
3071247f26830d2a5965a0ff3aa0c881c69e774621e9aba05e7fea2cc465e6bb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,79 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net8.0": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
"net8.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\cmerkens\\.nuget\\packages\\": {},
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj",
|
||||
"projectName": "Aufgabe4",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\cmerkens\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "WfyR0ESuB8c=",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe4\\Aufgabe4.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe5/Aufgabe5.csproj
Normal file
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe5/Aufgabe5.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
26
Semester3/DotNET/Aufgabenblatt2/Aufgabe5/Program.cs
Normal file
26
Semester3/DotNET/Aufgabenblatt2/Aufgabe5/Program.cs
Normal file
@ -0,0 +1,26 @@
|
||||
Console.WriteLine("Willkommen zu Aufgabe5");
|
||||
|
||||
ObjectFactory<Fahrzeug> fahrzeugFactory = new ObjectFactory<Fahrzeug>();
|
||||
ObjectFactory<PKW> pkwFactory = new ObjectFactory<PKW>();
|
||||
ObjectFactory<LKW> lkwFactory = new ObjectFactory<LKW>();
|
||||
|
||||
Fahrzeug fahrzeug = fahrzeugFactory.CreateInstance();
|
||||
PKW pkw = pkwFactory.CreateInstance();
|
||||
LKW lkw = lkwFactory.CreateInstance();
|
||||
|
||||
fahrzeug.kennzeichen = "1";
|
||||
pkw.kennzeichen = "2";
|
||||
lkw.kennzeichen = "3";
|
||||
|
||||
Console.WriteLine(fahrzeug.Drive());
|
||||
Console.WriteLine(pkw.Drive());
|
||||
Console.WriteLine(lkw.Drive());
|
||||
|
||||
|
||||
public class ObjectFactory<T> where T : class, new()
|
||||
{
|
||||
public T CreateInstance()
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj",
|
||||
"projectName": "Aufgabe5",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\cmerkens\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cmerkens\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\cmerkens\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe5")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe5")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgabe5")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
@ -0,0 +1 @@
|
||||
1506445df723fc69080072d7361ac43a3522e6d59070689c75a9d46e59140536
|
@ -0,0 +1,13 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Aufgabe5
|
||||
build_property.ProjectDir = C:\Git\Hochschule\Semester3\DotNET\Aufgabenblatt2\Aufgabe5\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
Binary file not shown.
@ -0,0 +1,79 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net8.0": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
"net8.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\cmerkens\\.nuget\\packages\\": {},
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj",
|
||||
"projectName": "Aufgabe5",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\cmerkens\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "o7RTRuJWdiI=",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe5\\Aufgabe5.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe6/Aufgabe6.csproj
Normal file
10
Semester3/DotNET/Aufgabenblatt2/Aufgabe6/Aufgabe6.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
54
Semester3/DotNET/Aufgabenblatt2/Aufgabe6/Program.cs
Normal file
54
Semester3/DotNET/Aufgabenblatt2/Aufgabe6/Program.cs
Normal file
@ -0,0 +1,54 @@
|
||||
Console.WriteLine("Willkommen zu Aufgabe6");
|
||||
|
||||
ExamPreparation try1 = new ExamPreparation(new YoloLearningStrategy());
|
||||
ExamPreparation try2 = new ExamPreparation(new SolidLearningStrategy());
|
||||
|
||||
try1.Prepare();
|
||||
try2.Prepare();
|
||||
|
||||
public interface ILearningInterface
|
||||
{
|
||||
public bool Learn();
|
||||
}
|
||||
|
||||
public class SolidLearningStrategy : ILearningInterface
|
||||
{
|
||||
public bool Learn()
|
||||
{
|
||||
Console.WriteLine("Stoff zusammenfassen und wiederholen.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class YoloLearningStrategy : ILearningInterface
|
||||
{
|
||||
public bool Learn()
|
||||
{
|
||||
Console.WriteLine("Mut zur Lücke!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ExamPreparation
|
||||
{
|
||||
public ILearningInterface LearningStrategy;
|
||||
|
||||
public ExamPreparation(ILearningInterface learningStrategy)
|
||||
{
|
||||
LearningStrategy = learningStrategy;
|
||||
}
|
||||
|
||||
public void Prepare()
|
||||
{
|
||||
Console.WriteLine("Starte Klausurvorbereitung…");
|
||||
bool result = LearningStrategy.Learn();
|
||||
if (result)
|
||||
{
|
||||
Console.WriteLine("Klausurvorbereitung erfolgreich beendet.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Klausurvorbereitung gescheitert, so ein Mist…");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Aufgabe6/1.0.0": {
|
||||
"runtime": {
|
||||
"Aufgabe6.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Aufgabe6/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net8.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe6\\Aufgabe6.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe6\\Aufgabe6.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe6\\Aufgabe6.csproj",
|
||||
"projectName": "Aufgabe6",
|
||||
"projectPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe6\\Aufgabe6.csproj",
|
||||
"packagesPath": "C:\\Users\\cmerkens\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Git\\Hochschule\\Semester3\\DotNET\\Aufgabenblatt2\\Aufgabe6\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\cmerkens\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\cmerkens\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\cmerkens\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgabe6")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cdcd0d8a41b1cd98a36e75864f9cf94c2e930afe")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgabe6")]< |