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