|
|
@ -0,0 +1,56 @@ |
|
|
|
#include <stdio.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <stdbool.h> |
|
|
|
|
|
|
|
#include "add_subject.h" |
|
|
|
#include "modify_subject.h" |
|
|
|
#include "add_student.h" |
|
|
|
#include "modify_student.h" |
|
|
|
#include "show_statistics.h" |
|
|
|
|
|
|
|
int main(){ |
|
|
|
bool running = true; |
|
|
|
|
|
|
|
while (running){ |
|
|
|
|
|
|
|
int option = 0; |
|
|
|
|
|
|
|
system("clear"); |
|
|
|
printf("Wählen Sie eine Option:\n"); |
|
|
|
printf("\t1.Fach hinzufügen\n"); |
|
|
|
printf("\t2.Fach bearbeiten\n"); |
|
|
|
printf("\t3.Student hinzufügen\n"); |
|
|
|
printf("\t4.Student bearbeiten\n"); |
|
|
|
printf("\t5.Statistiken anzeigen\n"); |
|
|
|
printf("\t6.Exit\n"); |
|
|
|
|
|
|
|
scanf("%d", &option); |
|
|
|
getchar(); |
|
|
|
|
|
|
|
switch (option){ |
|
|
|
case 1: |
|
|
|
add_subject(); |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
modify_subject(); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
add_student(); |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
modify_student(); |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
show_statistics(); |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
system("clear"); |
|
|
|
running = false; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |