Unterricht + Übung Tag 4
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
namespace Tag_4_Unterricht;
|
||||
|
||||
public class Sealed
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class Fahrzeug
|
||||
{
|
||||
public virtual void fahren()
|
||||
{
|
||||
Console.WriteLine("Wroom!");
|
||||
}
|
||||
}
|
||||
|
||||
class Auto : Fahrzeug
|
||||
{
|
||||
public sealed override void fahren()
|
||||
{
|
||||
Console.WriteLine("Brumm!");
|
||||
}
|
||||
}
|
||||
|
||||
class PKW : Auto
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user