|
@@ -2,10 +2,7 @@ package rocks.zipcode.io.quiz4.collections;
|
2
|
2
|
|
3
|
3
|
import rocks.zipcode.io.quiz4.objectorientation.Student;
|
4
|
4
|
|
5
|
|
-import java.util.ArrayList;
|
6
|
|
-import java.util.HashMap;
|
7
|
|
-import java.util.List;
|
8
|
|
-import java.util.Map;
|
|
5
|
+import java.util.*;
|
9
|
6
|
|
10
|
7
|
/**
|
11
|
8
|
* @author leon on 11/12/2018.
|
|
@@ -40,6 +37,10 @@ List<Student> studentList = new ArrayList<>();
|
40
|
37
|
public Map<Student, Double> getStudyMap() {
|
41
|
38
|
|
42
|
39
|
Map <Student, Double> myMap = new HashMap<>();
|
|
40
|
+ for (Student s :studentList) {
|
|
41
|
+ myMap.put(s, s.getTotalStudyTime());
|
|
42
|
+
|
|
43
|
+ }
|
43
|
44
|
|
44
|
45
|
|
45
|
46
|
return myMap;
|