Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HighSchoolStudent extends Student
- {
- double gpa;
- HighSchoolStudent(String fName, String lName, int gLevel, double g)
- {
- super(fName, lName, gLevel);
- if ((g >= 0 && g <= 5))
- gpa = g;
- else
- gpa = 0;
- }
- public String toString()
- {
- return super.toString() + "\n GPA: " + gpa;
- }
- }
Add Comment
Please, Sign In to add comment