I am trying to do inheritance in java and the extra varaibles that are outside the inheritance class aren't being shown when I display : Inheritance is not completely working for me as the extra variables outside the inhertance class are not being displayed. When I input the employee details and input the wage it is accepted. But then it is not shown when I list all employees in database or when searching for an employee
    
    public class Employee extends Person{
    public Employee(){
        
    }
    public Employee (int id, int wage, String name, String surname ){
        super(id,name,surname);
        this.wage= wage;
    }
    
    
    private int wage;
    
    public void SetWage(int wg){
        wage=wg;
    }
    public int GetWage (){
        return wage;
    }
    
    
    public String toString(){
       return "ID: " + this.GetId() + "\nName:" + this.GetName() + "\nSurname:" 
       + this.GetSurname() + "Wage: " + this.GetWage();
       
    }
    
}

Similairly the client class is not working. Also here is the code for the person class

    public class Person{
    public Person(){
        pId = 0;
        pName = "";
        pSurname = "";
    }
    public Person (int id, String nm, String sn ){
        pId = id;
        pName = nm;
        pSurname = sn;
    }
    
    private int pId;
    private String pName;
    private String pSurname; 
    
    public int GetId(){
        return pId;
    }
    public void SetId(int id){
        pId= id;
    }
    
    public String GetName(){
        return pName;
    }
    public void SetName(String nm){
        pName = nm;
    }
    
    public String GetSurname (){
        return pSurname;
    }
    public void SetSurname(String sn){
        pSurname = sn ;
    }
    
    public String ToString(){
        return "ID: " + this.GetId() + "\nName:" + this.GetName() + "\nSurname:" + this.GetSurname();
    }
    
}

Any suggestions?