-
Notifications
You must be signed in to change notification settings - Fork 0
/
PLO.java
89 lines (69 loc) · 2.44 KB
/
PLO.java
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
import java.util.ArrayList;
public class PLO extends LearningOutcomes{
private Program program;
private ArrayList<CLO> plosClos=new ArrayList<>();
//filing params
private int programId;
private ArrayList<Integer> plosClosIds=new ArrayList<>();
//constructor
public PLO(int id, String objective, Program program,int programId,ArrayList<CLO> plosClos,ArrayList<Integer> plosClosIds) {
super(id, objective);
this.program = program;
this.programId= programId;
this.plosClos=plosClos;
this.plosClosIds=plosClosIds;
}
//print plo
public void printPLO() {
System.out.println("ID: "+this.getId());
System.out.println("objective: "+this.getObjective());
if(program!=null)
System.out.print("Program: "+program.getId()+" ||| ");
System.out.println("ProgramId: "+programId);
System.out.println();
if(plosClos!=null) {
for (int i = 0; i < plosClos.size(); i++)
System.out.print("plosClos " + plosClos.get(i).getId() + " ");
System.out.print(" ||| ");
}
if(plosClosIds!=null) {
for (int i = 0; i < plosClosIds.size(); i++)
System.out.print("PlosClosId " + plosClosIds.get(i) + " ");
}
System.out.println('\n');
}
//custom function
public void assignCLO(CLO clo) {
if(this.plosClos==null)
this.plosClos=new ArrayList<>();
if(this.plosClosIds==null)
this.plosClosIds=new ArrayList<>();
this.plosClos.add(this.plosClos.size(),clo);
this.plosClosIds.add(this.plosClosIds.size(),clo.getId());
}
////////////////////////////////////////////////getter setters///////////////////////////
public void setPlosClos(ArrayList<CLO> plosClos) {
this.plosClos = plosClos;
}
public void setPlosClosIds(ArrayList<Integer> plosClosIds) {
this.plosClosIds = plosClosIds;
}
public ArrayList<CLO> getPlosClos() {
return plosClos;
}
public ArrayList<Integer> getPlosClosIds() {
return plosClosIds;
}
public int getProgramId() {
return programId;
}
public void setProgramId(int programId) {
this.programId = programId;
}
public void setProgram(Program program) {
this.program = program;
}
public Program getProgram() {
return program;
}
}