-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStudent.java
65 lines (51 loc) · 1.5 KB
/
Student.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
package com.kevinturner.jv;
import java.io.Serializable;
public class Student implements Serializable{
private String username;
private String password;
private String id;
private String deviceType;
private String deviceToken;
private Course [] courses;
private static final long serialVersionUID = 2L;
public Student(String id2, String username, String password, Course [] courses, String deviceType, String deviceToken){
this.id = id2;
this.username = username;
this.password = password;
this.courses = courses;
this.deviceToken = deviceToken;
this.deviceType = deviceType;
}
public String getDeviceType(){
return deviceType;
}
public String getDeviceToken(){
return deviceToken;
}
public String getId(){
return id;
}
public User getUser(){
return new User(username, password, id);
}
public void setCourses(Course [] courses){
this.courses = courses;
}
public String getUsername(){
return username;
}
public String getPassword(){
return password;
}
public Course [] getCourses(){
return courses;
}
@Override public String toString(){
String student = username + "\n";
for(int i = 0; i < courses.length; i++){
if(courses[i] != null)
student = student + courses[i].toString() + "\n\n";
}
return student;
}
}