Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.34 KB | None | 0 0
  1. public class Studentenverwaltung {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.     int stud1_matrikel = 20001,
  6.         stud1_day = 2,
  7.         stud1_month = 3,
  8.         stud1_year = 1989,
  9.         stud1_study = 1;
  10.  
  11.     int stud2_matrikel = 20004,
  12.         stud2_day = 2,
  13.         stud2_month = 3,
  14.         stud2_year = 1989,
  15.         stud2_study = 1;
  16.  
  17.     int stud3_matrikel = 20006,
  18.         stud3_day = 2,
  19.         stud3_month = 3,
  20.         stud3_year = 1989,
  21.         stud3_study = 3;
  22.  
  23.     int stud4_matrikel = 20008,
  24.         stud4_day = 2,
  25.         stud4_month = 3,
  26.         stud4_year = 1989,
  27.         stud4_study = 5;
  28.  
  29.     int stud5_matrikel = 20021,
  30.         stud5_day = 2,
  31.         stud5_month = 3,
  32.         stud5_year = 1989,
  33.         stud5_study = 2;
  34.  
  35.     System.out.println("_____________________________________");
  36.     System.out.println("Matrikelnummer: " + stud1_matrikel);
  37.  
  38.     if (stud1_study == 1)       System.out.println("Studiengang: Informatik");
  39.     else if (stud1_study == 2)  System.out.println("Studiengang: Wirtschaftsinformatik");
  40.     else if (stud1_study == 3)  System.out.println("Studiengang: Medieninformatik");
  41.     else if (stud1_study == 4)  System.out.println("Studiengang: Systemintergration");
  42.     else                        System.out.println("Studiengang: Mediendesign");
  43.  
  44.     if (stud1_study == 1 || stud1_study == 1 || stud1_study == 3) System.out.println("Fachbereich: 1");
  45.     else System.out.println("Fachbereich: 2");
  46.  
  47.     System.out.println("_____________________________________");
  48.  
  49.     }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement