-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLO.java
139 lines (110 loc) · 3.74 KB
/
CLO.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import java.util.*;
public class CLO extends LearningOutcomes {
private ArrayList<Topics> topics = new ArrayList<Topics>();
private ArrayList<Courses> courses =new ArrayList<Courses>();
private PLO plo;
////filing params
private int ploId;
private ArrayList<Integer> topicsIds = new ArrayList<Integer>();
private ArrayList<Integer> courseIds = new ArrayList<Integer>();
///constructor
public CLO(int id, String objective, ArrayList<Topics> topics, ArrayList<Courses> courses,ArrayList<Integer> topicsIds, ArrayList<Integer> coursesIds,PLO plo,int ploId ) {
super(id, objective);
this.topics = topics;
this.courses = courses;
this.topicsIds=topicsIds;
this.courseIds=coursesIds;
this.plo=plo;
this.ploId=ploId;
}
//printing clos
public void printCLO() {
System.out.println("ID: "+this.getId());
System.out.println("objective: "+this.getObjective());
if(plo!=null)
{
System.out.println("plo: "+this.getPlo().getId());
}
System.out.println("plo Id: "+this.getPloId());
if(courses!=null) {
for (int i = 0; i < courses.size(); i++)
System.out.print("Courses " + courses.get(i).getId() + " ");
System.out.print(" ||| ");
}
if(courseIds!=null) {
for (int i = 0; i < courseIds.size(); i++)
System.out.print("courseIds " + courseIds.get(i)+ " ");
}
System.out.println();
if(topics!=null) {
for (int i = 0; i < topics.size(); i++)
System.out.print("Topics " + topics.get(i).getId() + " ");
System.out.print(" ||| ");
}
if(topicsIds!=null) {
for (int i = 0; i < topicsIds.size(); i++)
System.out.print("TopicsId " + topicsIds.get(i)+ " ");
}
System.out.println('\n');
}
//custom functions
public void assignTopic(Topics topic) {
if(this.topics==null)
this.topics=new ArrayList<>();
if(this.topicsIds==null)
this.topicsIds=new ArrayList<>();
this.topics.add(topics.size(), topic);
this.topicsIds.add(topicsIds.size(),topic.getId());
}
public void assignCourse(Courses course) {
if(this.courses==null)
this.courses=new ArrayList<>();
if(this.courseIds==null)
this.courseIds=new ArrayList<>();
this.courses.add(courses.size(), course);
this.courseIds.add(courseIds.size(),course.getId());
}
/////////////////////////getter setters/////////////////////
public void setTopicsIds(ArrayList<Integer> topicsIds) {
this.topicsIds = topicsIds;
}
public void setCourseId(ArrayList<Integer> courseId) {
this.courseIds = courseId;
}
public ArrayList<Integer> getTopicsIds() {
return topicsIds;
}
public ArrayList<Integer> getCourseId() {
return courseIds;
}
public PLO getPlo() {
return plo;
}
public int getPloId() {
return ploId;
}
public void setPlo(PLO plo) {
this.plo = plo;
}
public void setPloId(int ploId) {
this.ploId = ploId;
}
public void setCourses(ArrayList<Courses> courses) {
this.courses = courses;
}
public void setCourseIds(ArrayList<Integer> courseIds) {
this.courseIds = courseIds;
}
public ArrayList<Courses> getCourses() {
return courses;
}
public ArrayList<Integer> getCourseIds() {
return courseIds;
}
public void setTopics(ArrayList<Topics> topics) {
this.topics = topics;
}
public ArrayList<Topics> getTopics() {
return topics;
}
}