Accessing a property of a class top down is done through hierarchical access through dot operator which is very common in the HVL world. Accessing class properties bottom up through multiple levels is also a requirement we come across in verification which is little bit tricky to implement.
Following is an example on how we could do a bottom up access of a class property.
function new ( top parent_of_the_class);
$display(" Flag set \n");
$display(" Flag not set \n");