Encapsulation and Polymorphism difference in points
Answers
Answered by
2
Explanation:
Polymorphism
Polymorphism means existing in many forms. Variables, functions, and objects can exist in multiple forms in Java and Python. There are two types of polymorphism which are run time polymorphism and compile-time polymorphism. Run time can take a different form while the application is running and compile-time can take a different form during compilation.
Encapsulation
This is a programming style where implementation details are hidden. It reduces software development complexity greatly. With Encapsulation, only methods are exposed. The programmer does not have to worry about implementation details but is only concerned with the operations. For example, if a developer wants to use a dynamic link library to display date and time, he does not have to worry about the codes in the date and time class rather he would simply use the data and time class by using public variables to call it up. In essence encapsulation is achieved in Python and Java by creating Private variables to define hidden classes in and then using public variables to call them up for use.
Thank you
please thank this answer
please mark this as brilliant answer
Answered by
4
Answer:
- Encapsulation- • It is a mechanism that binds the data and code together into a single unit.
- Polymorphism- The word polymorphism means "many forms". It is the ability of a function or an object to acquire multiple form...
Explanation:
Plzzz mark me as brainliest plzzzzzz.....
Similar questions