// To achieve this(as discuseed in previopus code), we declare base class functions as virtual.