Q 1: Since you’ve overwritten the display() function in the extended class, you will need to call super from within the derived class if you want to call the base class function. I included an example. You can include super.display() also in the display function of your extended class. (not a separate function as I coded)
Q 2: Functionally, no. However, I include it to show intent. From LRM: A virtual method may override a non-virtual method, but once a method has been identified as virtual, it
shall remain virtual in any subclass that overrides it. In that case, the virtual keyword may be used in later declarations, but is not required.
Q 3: Yes. The above quote applies here as well. Once you go virtual, you never go back, as they say.
I coded it up in EDA playground so you could play with it:
ps you made a statement unintentionally near the end that was incorrect… I fleshed it out in my example, but
D0 = C0; or $cast(D0, C0); //ERROR as per SV.
The $cast statement in bold is not an error; it is actually just a “downcast”, a common and useful feature if your extended class has additional data members, and you have a base handle but need access to the extended class members.