diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java index 1a502ae..e6cf202 100644 --- a/src/main/java/org/example/Main.java +++ b/src/main/java/org/example/Main.java @@ -7,7 +7,7 @@ public class Main { Administration administration = new Administration(); Scanner scanner = new Scanner(System.in); boolean exit = false; - + boolean DummyDataExists = false; while (!exit) { System.out.println("\n--- Student Management System Menu ---"); System.out.println("1. Register Student"); @@ -47,9 +47,31 @@ public class Main { case 7: System.out.println("Dummy data initialized."); + + Student student1 = new Student("Mark", "S1001", "Student"); + Student student2 = new Student("Sebastian", "S1002", "Student"); + administration.addStudents(student1); + administration.addStudents(student2); + Professor prof1 = new Professor("Joachim", "P1001", "Professor"); + Professor prof2 = new Professor("Herbert", "P1002", "Professor"); + administration.addProfessor(prof1); + administration.addProfessor(prof2); + Admin admin1 = new Admin ("Peter", "A1001", "Admin"); + Admin admin2 = new Admin ("Martin", "A1002", "Admin"); + administration.addAdmin(admin1); + administration.addAdmin(admin2); + Course.addCourse("Math", "C1001", 5, "courseData.txt"); + Course.addCourse("English", "C1002", 6, "courseData.txt"); + + DummyDataExists = true; + break; case 8: + if (DummyDataExists){ + Course.deleteCourse("courseData.txt"); + Course.deleteCourse("courseData.txt"); + } exit = true; System.out.println("Exiting..."); break;