class abc{
int a;
int b;
sum()
}
/*In objected oriented programming : we use the same class multiple times
with the use of objects*/
// Procedural : c and pascal
// OOPs languages: c++ , Java , python
| Procedural | Object oriented language |
|---|---|
| Methods, sequence of action | Object and interaction |
| Data is exposed | Data is not exposed |
| Code can’t be reused much | much more reuse |
Why use OOPs?
Real life analogy of OOPs? 1.
Balance = 100
withdraw balance(){
...
}
addMoney(){
...
}
// with the helps of oops : We can have the same code for different objects.
Why is OOPs languages better for large projects?