Suppose student promotion requires the presence of gpa, which must be present when adding a student, in which case you will create
Student s = new Student(5,"stud1",4.0);
Suppose some class promotions do not require gpa when promoting, then your student object will be Student s= new Student(6,"stud2");, which implies that the gpa students are ZERO.
source
share