forked from Rapter1990/JavaStreamAPIExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.java
More file actions
117 lines (89 loc) · 2.48 KB
/
Student.java
File metadata and controls
117 lines (89 loc) · 2.48 KB
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
package studentdata;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class Student {
private String name;
private int gradeLevel;
private double gpa;
private String gender;
private int noteBooks;
private Optional<Bike> bike;
public Optional<Bike> getBike() {
return bike;
}
public void setBike(Optional<Bike> bike) {
this.bike = bike;
}
public Student(){
}
public Student(String name, int gradeLevel, double gpa, String gender, int noteBooks, List<String> activities) {
this.name = name;
this.gradeLevel = gradeLevel;
this.gpa = gpa;
this.gender = gender;
this.noteBooks = noteBooks;
this.activities = activities;
}
public int getNoteBooks() {
return noteBooks;
}
public void setNoteBooks(int noteBooks) {
this.noteBooks = noteBooks;
}
public Student(String name, int gradeLevel, double gpa, String gender, List<String> activities) {
this.name = name;
this.gradeLevel = gradeLevel;
this.gpa = gpa;
this.gender = gender;
this.activities = activities;
}
public Student(String s) {
this.name = s;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getGradeLevel() {
return gradeLevel;
}
public void setGradeLevel(int gradeLevel) {
this.gradeLevel = gradeLevel;
}
public double getGpa() {
return gpa;
}
public void setGpa(double gpa) {
this.gpa = gpa;
}
List<String> activities = new ArrayList<>();
public List<String> getActivities() {
return this.activities;
}
public void setActivities(List<String> activities) {
this.activities = activities;
}
public void printListOfActivities(){
System.out.println("List of Activities are : " + this.activities);
}
@Override
public String toString() {
return "Student{" +
"name='" + name + '\'' +
", gradeLevel=" + gradeLevel +
", gpa=" + gpa +
", gender='" + gender + '\'' +
", activities=" + activities +
", notebooks=" + noteBooks +
'}';
}
}