Commit 0c3a5afa authored by Uwe Wienkop's avatar Uwe Wienkop

2020-05-17

parent cde4df2c
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>_05_UebgMo_Warenwirtschaft</RootNamespace>
</PropertyGroup>
</Project>
using System;
namespace _05_UebgMo_Warenwirtschaft
{
// Programmieren Sie ein rudimentäres System zur Verwaltung beliebiger Produkte
// Jedes Produkt soll die folgenden Eigenschaften besitzen, int stueckzahl, double preis, string name
// Es soll eigene (abstract oder nicht-abstract) Klassen für einzelne Produkte mit individuellen Datenfeldern geben:
// - Metallwaren mit den Unterklassen Schrauben und Nägel
// - Milchprodukte mit den Unterklassen Joghurt und Butter
// - Gartenprodukte mit den Unterklassen Pflanzen und Container; Schreiben Sie für die Pflanze eine besondere
// Methode, die nur Pflanzen haben.
// Erstellen Sie diese Klassen/Unterklassen mit geeigneten Konstruktoren, Basisklassenaufrufen, usw.
// Entscheiden Sie, wie Sie vererben wollen (virtual/abstract)
// Geben Sie für jede Klasse - wo sinnvoll - eine Überschreibung der ToString()-Methode an
// Legen Sie in Main() ein Feld mit einem Objekt je Klasse an, geben Sie alle Elemente in einer Schleife aus
// und schreiben Sie eine Methode, die z.B. nach der Pflanze über den Namen sucht und dieses Objekt zurückliefert
// Rufen Sie dann für die Pflanze die besondere Methode auf.
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
{
"format": 1,
"restore": {
"C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj": {}
},
"projects": {
"C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj",
"projectName": "05 UebgMo Warenwirtschaft",
"projectPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj",
"packagesPath": "C:\\Users\\wienkop\\.nuget\\packages\\",
"outputPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\wienkop\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.201\\RuntimeIdentifierGraph.json"
}
}
}
}
}
\ No newline at end of file
<?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\wienkop\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>
\ No newline at end of file
//------------------------------------------------------------------------------
// <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("05 UebgMo Warenwirtschaft")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("05 UebgMo Warenwirtschaft")]
[assembly: System.Reflection.AssemblyTitleAttribute("05 UebgMo Warenwirtschaft")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.
{
"version": 3,
"targets": {
".NETCoreApp,Version=v3.1": {}
},
"libraries": {},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": []
},
"packageFolders": {
"C:\\Users\\wienkop\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj",
"projectName": "05 UebgMo Warenwirtschaft",
"projectPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj",
"packagesPath": "C:\\Users\\wienkop\\.nuget\\packages\\",
"outputPath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\wienkop\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.201\\RuntimeIdentifierGraph.json"
}
}
}
}
\ No newline at end of file
{
"version": 2,
"dgSpecHash": "Py4/VNXugw3kUxTKo2G8ZdrtEQsdVvYiLI1++eSP4xgaCaULoy4lCKLJddrABTcU801PjCzQL65VTSN+p4iGfw==",
"success": true,
"projectFilePath": "C:\\Users\\wienkop\\source\\repos\\prog2-ss2020-wienkop\\05 UebgMo Warenwirtschaft\\05 UebgMo Warenwirtschaft.csproj",
"expectedPackageFiles": [],
"logs": []
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
\ No newline at end of file
namespace HTML
{
// TODO: Define classes for HTML tag elements (using interfaces "ITagged" and eventually "INested") here...
}
\ No newline at end of file
namespace HTML
{
// HTML engine for generation of a HTML string from an array of HTML tag elements:
public interface ITagged { string TagId { get; } } // Used to define HTML tag element
public interface INested { object[] Elements { get; } } // Used to "mark" a HTML tag element as nested
public static class Engine
{
public static string Generate(params object[] elements)
{
// TODO: Your code for (recursive) generation of a HTML string from array "elements" here...
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HTMLEngine</RootNamespace>
<AssemblyName>HTMLEngine</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</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="HTMLElements.cs" />
<Compile Include="HTMLEngine.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using HTML;
class Program
{
// Test program for HTML generation:
static void Main()
{
// Generate HTML document and store result in string:
string html = Engine.Generate
(
new DocumentType(),
new Html
(
new Head
(
new Title("Generated HTML Example")
),
new Body
(
new Heading("Welcome to the Technical University of Nuremberg"),
new Paragraph
(
"We have a ", new Italic("distinct profile"), " and strive to maintain our ", new Italic("leading position"), " among comparable universities."
),
new Heading("Study for your future"),
new Paragraph
(
12, " departments provide more than ", 40, " degree programs in ", new Bold("engineering, business, design and social sciences."),
new LineBreak(),
"If you have questions, please contact the ", new Italic("Student Counseling Service"), " or the ", new Italic("Student Office.")
)
)
)
);
// Write resulting HTML string:
System.Console.WriteLine("GENERATED HTML DOCUMENT:");
System.Console.WriteLine(html);
System.Console.ReadKey(true);
/*
// Write reformatted HTML string:
System.Console.WriteLine("\nREFORMATTED HTML DOCUMENT:");
System.Console.WriteLine("\n<" + new DocumentType().TagId + ">\n" + System.Xml.Linq.XElement.Parse(html.Replace("\n", "")));
System.Console.ReadKey(true);
*/
// Show (original) HTML string in default browser:
System.Console.WriteLine("\nSTARTING BROWSER WITH GENERATED DOCUMENT...");
System.IO.File.WriteAllText("Example.html", html);
System.Diagnostics.Process.Start("Example.html");
}
}
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("HTMLEngine")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HTMLEngine")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("bced82d0-f95f-4d82-9019-2c63d6b3cc8a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
......@@ -46,7 +46,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "04 UebgMo ZyklischeListe",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "04 UebgDi Vererbung", "04 UebgDi Vererbung\04 UebgDi Vererbung.csproj", "{7E563224-8612-4E65-BDD5-875D4DB146EC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "04VererbungGrafischeObjekte", "04VererbungGrafischeObjekte\04VererbungGrafischeObjekte.csproj", "{7E54DCD9-0FAE-42BD-AC56-ED65E6AA60EE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "04VererbungGrafischeObjekte", "04VererbungGrafischeObjekte\04VererbungGrafischeObjekte.csproj", "{7E54DCD9-0FAE-42BD-AC56-ED65E6AA60EE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTMLEngine", "05HTMLEngine\HTMLEngine.csproj", "{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "05 UebgMo Warenwirtschaft", "05 UebgMo Warenwirtschaft\05 UebgMo Warenwirtschaft.csproj", "{2CFDBE8A-4925-4E0C-A686-7554394003A6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -134,6 +138,14 @@ Global
{7E54DCD9-0FAE-42BD-AC56-ED65E6AA60EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E54DCD9-0FAE-42BD-AC56-ED65E6AA60EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E54DCD9-0FAE-42BD-AC56-ED65E6AA60EE}.Release|Any CPU.Build.0 = Release|Any CPU
{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCED82D0-F95F-4D82-9019-2C63D6B3CC8A}.Release|Any CPU.Build.0 = Release|Any CPU
{2CFDBE8A-4925-4E0C-A686-7554394003A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2CFDBE8A-4925-4E0C-A686-7554394003A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CFDBE8A-4925-4E0C-A686-7554394003A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CFDBE8A-4925-4E0C-A686-7554394003A6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment