forked from nottherealironman/Study-progress-monitor-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubjectList.java
35 lines (28 loc) · 795 Bytes
/
SubjectList.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
import java.io.Serializable;
import java.util.LinkedList;
public class SubjectList implements Serializable
{
// Declaration of member variables
private LinkedList<Subject> subject;
// Constructor
public SubjectList(LinkedList<Subject> subject) {
this.subject = subject;
}
// Definition of Accessors methods
public LinkedList<Subject> getSubject() {
return subject;
}
// Definition of mutators methods
public void setSubject(LinkedList<Subject> subject) {
this.subject = subject;
}
// toString method definition
@Override
public String toString()
{
String subjectList = "";
for (int i = 0; i < this.subject.size(); i++)
subjectList += this.subject.get(i).toString();
return String.format("%s \n", subjectList);
}
}