Tag 3 Unterricht und Aufgaben

This commit is contained in:
wbs
2026-08-12 14:15:13 +02:00
parent a969e3cdc7
commit 78ac1b3936
73 changed files with 2928 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
namespace Tag_3_Unterricht;
public class New
{
public static void Main()
{
var autoViaOverride = new Override.Auto();
}
class ViaOverride
{
public class Produkt
{
protected int preis;
public virtual void SetPreis(int preis)
{
this.preis = preis;
}
}
public class Auto : Produkt
{
public override void SetPreis(int preis)
{
if (preis < 100) throw new ArgumentException("Zu günstig");
this.preis = preis;
}
}
}
class ViaOvershadow
{
}
}