Skip to content

Instantly share code, notes, and snippets.

@jtuttas
Created January 3, 2022 07:35
Show Gist options
  • Save jtuttas/d96f771394ff327ec145404fb301a832 to your computer and use it in GitHub Desktop.
Save jtuttas/d96f771394ff327ec145404fb301a832 to your computer and use it in GitHub Desktop.
private double getBeitrag(int alter, int mitgliedsjahre) {
double beitrag = 0;
if (alter < 18) {
beitrag = 30.0;
} else if (alter <= 12) {
beitrag = 15.0;
} else {
beitrag = 50.0;
}
if (mitgliedsjahre > 5 && mitgliedsjahre <= 15) {
beitrag = beitrag * 0.9;
} else if (mitgliedsjahre > 15) {
beitrag = beitrag * 0.8;
}
return beitrag;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment