34 lines
673 B
C#
34 lines
673 B
C#
namespace KFZ
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
PKW p = new PKW(42);
|
|
}
|
|
}
|
|
class Fahrzeuge
|
|
{
|
|
private int id;
|
|
public Fahrzeuge()
|
|
{
|
|
Console.WriteLine("Fahrzeuge ohne Para");
|
|
}
|
|
public Fahrzeuge(int id)
|
|
{
|
|
this.id = id;
|
|
Console.WriteLine("Fahrzeug mit Para");
|
|
}
|
|
}
|
|
class PKW : Fahrzeuge
|
|
{
|
|
public PKW()
|
|
{
|
|
Console.WriteLine("Pkw ohne Para");
|
|
}
|
|
public PKW(int id) : base(id)
|
|
{
|
|
Console.WriteLine("Pkw mit Para");
|
|
}
|
|
}
|
|
} |