Question: what is polymorphism what is the difference between method overriding and method overloading?
Answer: Overloading is when you have the same function name that takes different parameters. Overriding is when a child class replaces a parent's method with one of its own (this in iteself does not constitute polymorphism). ... This is because any child class can be used where a base class is defined.