add Programmyday form github
This commit is contained in:
35
Lohnabrechnung/Lohnsklaven.cs
Normal file
35
Lohnabrechnung/Lohnsklaven.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lohnabrechnung
|
||||
{
|
||||
internal class Lohnsklaven
|
||||
{
|
||||
protected string? name;
|
||||
protected string? vorname;
|
||||
protected double gehalt;
|
||||
|
||||
public void DatenAusgabe()
|
||||
{
|
||||
if (this is Angestellter)
|
||||
{
|
||||
Console.WriteLine("Angestellter:");
|
||||
}
|
||||
else if(this is ExternerMitarbeiter)
|
||||
{
|
||||
Console.WriteLine("Externer Mitarbeiter:");
|
||||
}
|
||||
else if (this is Praktikant)
|
||||
{
|
||||
Console.WriteLine("Praktikant:");
|
||||
}
|
||||
Console.WriteLine($"Name: {name}");
|
||||
Console.WriteLine($"Vorname: {vorname}");
|
||||
Console.WriteLine($"Gehalt: {gehalt:C2}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user