Dynamic stack/queue

in the dynamic stack/queue lecture, sir used instance of the parent class but object of child class. but the code will work well in case we make both instance and object of same child class. i am not able to know why sir used this or why it is better.

ps:please try to use real life situation to completely make me understand the concepts