Created
July 7, 2020 09:09
-
-
Save BMU-Verlag/dd7e1651d1cbacb809983a902f76a2a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Gehaltskategorien { | |
A, | |
B, | |
C, | |
D, | |
E, | |
F | |
} | |
public class Enum { | |
public static void main(String[] args) { | |
Gehaltskategorien mitarbeiter = Gehaltskategorien.C; | |
System.out.print("Das Jahresgehalt des Mitarbeiters beträgt "); | |
switch (mitarbeiter){ | |
case A: | |
System.out.print(18000); | |
break; | |
case B: | |
System.out.print(20400); | |
break; | |
case C: | |
System.out.print(24000); | |
break; | |
case D: | |
System.out.print(30000); | |
break; | |
case E: | |
System.out.print(42000); | |
break; | |
case F: | |
System.out.print(60000); | |
break; | |
} | |
System.out.print(" Euro."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment