feature: add blazor app
This commit is contained in:
57
FahrzeugDatenBank/Motorrad.cs
Normal file
57
FahrzeugDatenBank/Motorrad.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
namespace FahrzeugDatenBank
|
||||
{
|
||||
public class Motorrad : Fahrzeug, IAuftankbar
|
||||
{
|
||||
public Motorrad()
|
||||
{
|
||||
base.AnzahlRaeder = 2;
|
||||
base.ReifenTyp = "schmal";
|
||||
}
|
||||
|
||||
private bool istAufgetankt = false;
|
||||
|
||||
public void Auftanken()
|
||||
{
|
||||
this.istAufgetankt = true;
|
||||
}
|
||||
|
||||
public override void WechsleReifenTyp()
|
||||
{
|
||||
if (base.ReifenTyp == "schmal")
|
||||
{
|
||||
base.ReifenTyp = "breit";
|
||||
}
|
||||
else
|
||||
{
|
||||
base.ReifenTyp = "schmal";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace FahrzeugDatenBank
|
||||
{
|
||||
public class Motorrad2 : Fahrzeug
|
||||
{
|
||||
public Motorrad2()
|
||||
{
|
||||
base.AnzahlRaeder = 2;
|
||||
base.ReifenTyp = "schmal";
|
||||
}
|
||||
|
||||
public override void WechsleReifenTyp()
|
||||
{
|
||||
if (base.ReifenTyp == "schmal")
|
||||
{
|
||||
base.ReifenTyp = "breit";
|
||||
}
|
||||
else
|
||||
{
|
||||
base.ReifenTyp = "schmal";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user