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
public class Main {
public static void main(String[] args) {
Student[] s = new Student[12];
s[0] = new Student("s0", "ss0", "0000000", 18);
s[1] = new Student("s1", "ss1", "1111111", 12);
s[2] = new Student("s2", "ss2", "2222222", 10);
s[3] = new Student("s3", "ss3", "3333333", 14);
s[4] = new Student("s4", "ss4", "4444444", 20);
s[5] = new Student("s5", "ss5", "5555555", 18);
s[6] = new Student("s6", "ss6", "6666666", 19);
s[7] = new Student("s7", "ss7", "7777777", 17);
s[8] = new Student("s8", "ss8", "8888888", 11);
//System.out.println(s[2].getGrade());
/*s1.setGrade(15);
s1.print();
s2.print();
s2.setFirstName("hhh");
s2.print();
s3.print();*/
//System.out.println(s3.getId());
Lab[] az = new Lab[9];
az[0] = new Lab(20, "Sunday");
az[1] = new Lab(10, "Monday");
az[2] = new Lab(3, "Tuesday");
for(int i = 0; i < 3; i++){
for(int j = 0; j < 3; j++){
az[i].enrollStudent(s[j]);
}
}
University uni = new University("Computer Engineering", 3);
for(int i = 0; i < 3; i++){
uni.enrollLab(az[i]);
}
System.out.println("Name of university : "+uni.getName());
System.out.println("Number of labs : "+uni.getCurrentLab());
System.out.println("Capasity of university : "+uni.getSum());
System.out.println("Average of all of students in university : "+uni.getAverage());
}
}