Accesing child class properties through parent class

I want base class to access the properties of an extended class which are not present in the base class. can any one please help me with an example.

A class can only access things defined within itself, or inherited from its base(super) class. It cannot directly access anything in an extended class.

You can indirectly access things in an extended class through the use of virtual methods.

class base;
   int A;
   virtual function void print();
       $display("A: ",A);
   endfunction
   function void execute;
     print(); // calls any extension to print()
   endfunction
endclass
class derived extends base;
   int B;
   virtual function void print();
       super.print;
       $display("B: ",B);
   endfunction
endclass
module top;
   base b = new;
   initial b.execute(); // prints A only
   derived d = new;
   initial d.execute(); // prints both A and B
endmodule