|
@@ -1,7 +1,9 @@
|
1
|
1
|
package rocks.zipcode.io.quiz3.collections;
|
2
|
2
|
|
|
3
|
+import javafx.scene.Parent;
|
3
|
4
|
import rocks.zipcode.io.quiz3.objectorientation.enums.LabStatus;
|
4
|
5
|
|
|
6
|
+import javax.xml.soap.SOAPPart;
|
5
|
7
|
import java.util.HashMap;
|
6
|
8
|
import java.util.Map;
|
7
|
9
|
|
|
@@ -10,26 +12,33 @@ import java.util.Map;
|
10
|
12
|
*/
|
11
|
13
|
public class Student {
|
12
|
14
|
|
13
|
|
- Map<Lab,LabStatus >map=new HashMap<>();
|
|
15
|
+ Map<Lab, LabStatus >hm;
|
14
|
16
|
|
15
|
17
|
public Student() {
|
16
|
|
- this(null);
|
|
18
|
+
|
|
19
|
+ this.hm =new HashMap<>();
|
|
20
|
+ //this(null);
|
17
|
21
|
}
|
18
|
22
|
|
19
|
23
|
public Student(Map<Lab, LabStatus> map) {
|
20
|
24
|
|
21
|
|
- this.map=map;
|
|
25
|
+ this.hm=map;
|
22
|
26
|
}
|
23
|
27
|
|
24
|
28
|
public void setLabStatus(Lab lab, LabStatus labStatus) {
|
25
|
|
- map.put(lab,labStatus );
|
|
29
|
+ hm.put(lab,labStatus );
|
26
|
30
|
|
27
|
31
|
}
|
28
|
32
|
public void forkLab(Lab lab) {
|
29
|
|
- lab.getName();
|
|
33
|
+ LabStatus temp = hm.put(lab, LabStatus.PENDING);
|
|
34
|
+ System .out.println(temp);
|
30
|
35
|
}
|
31
|
36
|
|
32
|
37
|
public LabStatus getLabStatus(String labName) {
|
33
|
|
- throw new UnsupportedOperationException("Method not yet implemented");
|
|
38
|
+ try {
|
|
39
|
+ return hm.get(labName);
|
|
40
|
+ } catch (Exception e) {
|
|
41
|
+ throw new UnsupportedOperationException("Method not yet implemented");
|
|
42
|
+ }
|
34
|
43
|
}
|
35
|
44
|
}
|