Which method actually runsintermediate
A virtual method is chosen by the object at run time through a table each object points to; a non-virtual one — including one declared new — is fixed by the variable’s type when the code compiles.
The Julian calendar compiles, runs and gives Gregorian answers. GetSchoolBirthday lives in the base class, and its call to IsLeap was fixed to the base version when it compiled. Make the object decide.
Same method name, same base-typed variable, and the answer depends on the object.
Published in full, before you start — every point is one of these and there is nothing else.
A virtual method is chosen by the object at run time through a table each object points to; a non-virtual one — including one declared new — is fixed by the variable’s type when the code compiles.