Override nonvirtual method

In reply to Prathiksha:

Please don’t use the terms parent and child classes when referring to inheritance. When you construct a square_ext object, there is only one object containing both the extended and base class definitions. Parent and child implies that there are two separate objects.

In your top module, you have the s_ext class variable which can invoke the extended class method s_ext.sq(). Why can’t you use that variable instead of s.sq()?