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
| Initial List of Students:
Student{id=1, name='Alice', score=85.0, major='Computer Science'}
Student{id=2, name='Bob', score=45.0, major='Mathematics'}
Student{id=3, name='Charlie', score=78.5, major='Physics'}
Student{id=4, name='David', score=59.0, major='Computer Science'}
Student{id=5, name='Eve', score=93.0, major='Mathematics'}
Student{id=6, name='Frank', score=70.0, major='Physics'}
Student{id=2, name='Duplicate Bob', score=45.0, major='Mathematics'}
Student{id=7, name='Grace', score=88.5, major='Computer Science'}
Passed Students (After Removing Duplicates):
Student{id=1, name='Alice', score=85.0, major='Computer Science'}
Student{id=3, name='Charlie', score=78.5, major='Physics'}
Student{id=5, name='Eve', score=93.0, major='Mathematics'}
Student{id=6, name='Frank', score=70.0, major='Physics'}
Student{id=7, name='Grace', score=88.5, major='Computer Science'}
Students Grouped by Major:
Major: Computer Science
Student{id=1, name='Alice', score=85.0, major='Computer Science'}
Student{id=4, name='David', score=59.0, major='Computer Science'}
Student{id=7, name='Grace', score=88.5, major='Computer Science'}
Major: Mathematics
Student{id=2, name='Bob', score=45.0, major='Mathematics'}
Student{id=5, name='Eve', score=93.0, major='Mathematics'}
Major: Physics
Student{id=3, name='Charlie', score=78.5, major='Physics'}
Student{id=6, name='Frank', score=70.0, major='Physics'}
Average Score by Major:
Major: Computer Science, Average Score: 77.5
Major: Mathematics, Average Score: 69.0
Major: Physics, Average Score: 74.25
Students Sorted by Score (Descending):
Student{id=5, name='Eve', score=93.0, major='Mathematics'}
Student{id=7, name='Grace', score=88.5, major='Computer Science'}
Student{id=1, name='Alice', score=85.0, major='Computer Science'}
Student{id=3, name='Charlie', score=78.5, major='Physics'}
Student{id=6, name='Frank', score=70.0, major='Physics'}
Student{id=4, name='David', score=59.0, major='Computer Science'}
Student{id=2, name='Bob', score=45.0, major='Mathematics'}
Updated consequence:
Updated: Student{id=5, name='Eve', score=95.0, major='Mathematics'}
Student with ID 100 not found.
Global Statistics:
Highest Scoring Student: Student{id=5, name='Eve', score=95.0, major='Mathematics'}
Number of Passed Students: 5
Number of Failed Students: 2
|