-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
97 lines (71 loc) · 3.07 KB
/
Copy pathMain.java
File metadata and controls
97 lines (71 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
public class Main
{
public static void main(String[] args)
{
Student student1 = new Student();
student1.setId(1);
student1.setFirstName("Anýl");
student1.setLastName("YALIMDEMIR");
student1.setUserName("student1");
student1.setPassword("student1_123");
student1.setUserType("Student");
student1.setCourse("Java + React Yazýlýmcý Geliþtirme Kampý");
Student student2 = new Student();
student2.setId(2);
student2.setFirstName("Adem");
student2.setLastName("YALIMDEMIR");
student2.setUserName("student2");
student2.setPassword("student2_321");
student2.setUserType("Student");
student2.setCourse("C# + Angular Yazýlýmcý Geliþtirme Kampý");
Student[] students = new Student[] {student1, student2};
Instructor instructor1 = new Instructor();
instructor1.setId(1);
instructor1.setFirstName("Engin");
instructor1.setLastName("Demiroð");
instructor1.setUserName("engin.demirog");
instructor1.setPassword("instructor_engin123");
instructor1.setUserType("Instructor");
instructor1.setCourse("C# + Angular && Java + React Yazýlýmcý Geliþtirme Kampý");
Instructor[] instructors = new Instructor[] {instructor1};
User[] users = new User[] {instructor1, student1, student2};
UserManager userManager = new UserManager();
userManager.addMultiple(users);
System.out.println("\n\n############## ALL USERS ##############");
userManager.getAll(users);
System.out.println("\n#########################################\n");
System.out.println("\n\n############## TESTS FOR STUDENTS ##############");
StudentManager studentManager = new StudentManager();
studentManager.add(student1);
studentManager.add(student2);
studentManager.update(student2);
studentManager.remove(student1);
studentManager.addMultiple(students);
studentManager.joinCourse(student1);
studentManager.attendCourse(student2);
studentManager.attendCourse(student1);
studentManager.leaveCourse(student2);
studentManager.sendHomework(student1);
System.out.println("\n\n############## ALL STUDENTS ##############");
studentManager.getAll(students);
System.out.println("\n#########################################\n");
System.out.println("\n\n############## TESTS FOR STUDENTS ##############");
InstructorManager instructorManager = new InstructorManager();
instructorManager.add(instructor1);
instructorManager.update(instructor1);
instructorManager.remove(instructor1);
instructorManager.addMultiple(instructors);
instructorManager.addHomework(instructor1);
instructorManager.addCourse(instructor1);
instructorManager.updateCourse(instructor1);
instructorManager.updateHomework(instructor1);
instructorManager.removeHomework(instructor1);
instructorManager.removeCourse(instructor1);
System.out.println("\n\n############## ALL INSTRUCTORS ##############");
instructorManager.getAll(instructors);
System.out.println("\n#########################################\n");
}
}