-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathStudent.java
More file actions
46 lines (33 loc) · 949 Bytes
/
Student.java
File metadata and controls
46 lines (33 loc) · 949 Bytes
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
package org.launchcode.java.demos.lsn3classes1;
// Start working here with your Student class.
// To instantiate the Student class, add your code to the main in the file, SchoolPractice.
public class Student {
private String name = "Lindsey";
private int studentId;
private int numberOfCredits = 1;
private double gpa = 4.0;
public String getName() {
return name;
}
public void setName(String aName) {
this.name = aName;
}
public int getStudentId() {
return studentId;
}
public void setStudentId(int aStudentID) {
this.studentId = aStudentID;
}
public int getNumberOfCredits() {
return numberOfCredits;
}
public void setNumberOfCredits(int aNumberCredits) {
this.numberOfCredits = aNumberCredits;
}
public double getGpa() {
return gpa;
}
public void setGpa(double aGpa) {
this.gpa = aGpa;
}
}