I am trying to write the Undergrad class which extends Students
here is the base class (Student)
public class Student{
    private String name;
    private int id;
    private double gpa;
    public Student(){
    }
    public Student(int id, String name, double gpa){
        this.id = id;
        this.name = name;
        this.gpa = gpa;
    }
    public Student(int id, double gpa){
        this(id, "", gpa);
    }
    public String getName(){
        return name;
    }
    public int getId(){
        return id;
    }
    public double getGPA(){
        return gpa;
    }
    public void setName(String newName){
        this.name = newName;
    }
    @Override
    public String toString(){
        return "Student:\nID: " + id + "\nName: " + name + "\nGPA: " + gpa;
    }
}
and here the derived class (Undergrad)
public class Undergrad extends Student {
    private String year;
    public Undergrad (int id , String name ,double gpa,String year)
    {
        super(id,name , gpa);
        this.year =year;
    }
    @Override
    public String toString(){
        return super() + " the year is :" + year;
    }
}
the problem i'm facing is that eclipse shows that I have a mistake in toString method in class Undergrad exactly at the super() invoke the error says
"Syntax error on token "super", invalid Name"
could I find any help please ?
 
     
     
     
    