Professional Documents
Culture Documents
S.LAKSHMI PRABHA
1815053
ABSTRACTION
Advantages of Abstraction:
Abstraction makes code as readable and more simpler. Because complexity of code will be
hidden and also makes code from longer to small , because abstraction doesn't show
unnecessary things.
Realtime Examples of Abstraction :
• We all use an ATM machine for cash withdrawal, money transfer, retrieve min-
statement, in our daily life.
• But we don't know internally what things are happening inside ATM machine
• when you insert an ATM card for performing any kind of operation.
ENCAPSULATION
• The main disadvantage of encapsulation in Java is it increases the length of the code
and slows shutdown execution.
• If combinations of medicine are variables and methods then the capsule will act as a
class and the whole process is called Encapsulation.