Software design
How does abstraction differ from encapsulation?
Abstraction is the process of gaining the information whereas encapsulation is the process to contain the information. Abstraction is the method of hiding the unwanted information whereas encapsulation is a method to hide the data from outside world. During software design, The problems of abstraction are solved at the design whereas in encapsulation, problems are solved at the implementation level. We can implement abstraction using abstract class and interfaces whereas encapsulation can be implemented using by the specific access modifiers i.e., private, protected and public.
Get Answers For Free
Most questions answered within 1 hours.