Professional Documents
Culture Documents
003 OOP Concepts
003 OOP Concepts
Concepts
By
Rajanikanth B
www.btechsmartclass.com
Introduction
OOP stands for Object Oriented Programming
Introduction
Majorly there are FOUR concepts in OOPs
Introduction
1. Encapsulation
2. Abstraction
3. Polymorphism
4. Inheritance
BEFORE… start these concepts
What is an Object?
What is a class?
ENCAPSULATION
Process of combining data and code
Encapsulation
Class of variables =
= variables
Class is a collection Data + single
+ functions
and functions under Code unit
ENCAPSULATION
class BankAccount
BankAccount
Attributes
{
String name ;
String name ;
int accountNumber;
int accountNumber;
double balance ;
double balance ;
String dateOpened;
String dateOpened;
String accountType;
String accountType;
String branch;
String branch; Behavior
void open( ){….}
void open( ){….}
void close( ){….}
void close( ){….}
void deposit( ){….}
void deposit( ){….}
void withdraw( ){….}
void withdraw( ){….}
}
ABSTRACTION
Process of focusing on the essentials, ignoring the irrelevant
and unimportant things
private Yes No No No