-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathStudent.java
More file actions
38 lines (28 loc) · 917 Bytes
/
Student.java
File metadata and controls
38 lines (28 loc) · 917 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
package students.mesheikbrown;
public class Student extends Person {
private int gradeLevel;
private double gpa;
public Student(int id, String firstName, String lastName,String email, int gradeLevel,double gpa){
super(id,firstName,lastName,email);
this.gradeLevel = gradeLevel;
this.gpa = gpa;
}
public String isOnHonorRoll(double gpa){
if(gpa >= 3.2){
return "Yes";
}else {
return "No";
}
}
public int getgradeLevel() {
return gradeLevel;
}
public double getgpa() {
return gpa;
}
@Override
public void getSummary(){
System.out.println("Student " + super.getfirstName() + " " + super.getlastName() + " |" + " Grade Level: "
+ getgradeLevel() + " | " + "GPA: " + getgpa() + " | " + "Honor Roll: " + isOnHonorRoll(getgpa()));
}
} // ends class