Question: what is the difference between inheritance encapsulation and polymorphism?
Answer: Inheritance has to do with methods and functions inheriting the attributes of another class. ... Polymorphism allows program code to have different meaning or functions while encapsulation is the process of keeping classes private so they cannot be modified by external codes.