30 lines
387 B
C#
30 lines
387 B
C#
|
|
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
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|