add Programmyday form github
This commit is contained in:
42
Lohnabrechnung/Angestellter.cs
Normal file
42
Lohnabrechnung/Angestellter.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lohnabrechnung
|
||||
{
|
||||
internal class Angestellter : Lohnsklaven
|
||||
{
|
||||
private int alter;
|
||||
private string? tarifgruppe;
|
||||
public Angestellter(int alter, string? tarifgruppe, string? name, string? vorname)
|
||||
{
|
||||
this.alter = alter;
|
||||
this.tarifgruppe = tarifgruppe;
|
||||
this.name = name;
|
||||
this.vorname = vorname;
|
||||
hungerlohn();
|
||||
}
|
||||
public void hungerlohn()
|
||||
{
|
||||
if (tarifgruppe == "A" || tarifgruppe == "a")
|
||||
{
|
||||
this.gehalt = 2560 * (1 + ((this.alter - 25.0) / 100));
|
||||
}
|
||||
else if (tarifgruppe == "B" || tarifgruppe == "b")
|
||||
{
|
||||
this.gehalt = 3000 * (1 + ((this.alter - 25.0) / 100));
|
||||
}
|
||||
else if (tarifgruppe == "C" || tarifgruppe == "c")
|
||||
{
|
||||
this.gehalt = 3200 * (1 + ((this.alter - 25.0) / 100));
|
||||
}
|
||||
else if (tarifgruppe == "D" || tarifgruppe == "d")
|
||||
{
|
||||
this.gehalt = 5400 * (1 + ((this.alter - 25.0) / 100));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user