Abstraction is showing only necessary things, but Encapsulation is hiding complexity.
for example, if we have a user log in form then we need only user id and password and a function to put on login button this shows abstraction (only necessary things) but logic should be written in some other class file and this is Encapsulation(Hiding Complexity).
for example, if we have a user log in form then we need only user id and password and a function to put on login button this shows abstraction (only necessary things) but logic should be written in some other class file and this is Encapsulation(Hiding Complexity).
0 comments:
Post a Comment