Object Oriented Programming System (OOPs) ========================================= ==> For the application development, the languages which we are using are categorized into two paradigms/models: 1) Procedural Programming Languages (PPL) 2) Object Oriented Programming Languages (OOPL) 1) Procedural Programming Languages (PPL) ========================================= Ex: C ==> can be for developing the applications using functions. ==> the data can be defined at one place and process that data at another place for performing task. ==> we can develop small scale applications but not large scale applications. #include void addition(int a,int b); // function declaration void multiplication(int a,int b); void main() { int x,y; x = 9; y = 11; addition(x,y); // function call multiplication(x,y); } void addition(int a,int b) { printf("The sum = ",a+b); } void multiplication(int a,int b) { printf("The Product = ",a*b); } 2) Object Oriented Programming Languages (OOPL) =============================================== ==> In OOPL, the data can be defined at one block and can use within the same block. ==> OOPs (Object Oriented Programming System) principles: Abstraction Encapsulation Inheritance Polymorphism ==> The languages which can support to implement all the above principles of OOPs are called as "Object Oriented Programming Languages" Ex: Java, Python, C#, c++ etc Abstraction =========== Ex: Phonepe HDFC user ICICI user SBI user Union Bank User etc. 100 1000 2000 Postpaid = Airtel ==> It is the process of showing the data which is relevant and the data which is un-relevant we can hide this is called as "abstraction" Ex: WhatsApp me =====> user read conversation of me and user cannot read other user conversations. credit bills phonepe ===> slice <=== Paytm ==> To implement the abstraction, there are two concepts: 1) abstract class 2) Interface ===================================================== 2) Encapsulation: ================= class myClass{ int a = 100; float b = 1.23f; met(); } mc.a = 200; mc.b = 123.234f; ==> Encapsulation is the process of binding/wrapping/grouping of private data and corresponding functionality with getters and setters methods of public type. ==> To implement the Encapsulation: Access modifiers getters and setters methods ================================================ 3) Inheritance: =============== grandfather (2 crs) ====> father (3 cr) ====> son parent class{ properties; } child class extends parent class{ } ==> Acquiring the properties of one class to another class is called as "Inheritance". Advantages: ========== 1) Decrease the re-writing 2) Improve redundancy ==> To implement: extends keyword ======================================================== Polymorphism: ============= poly (many) + morphs (forms) ==> One object with many forms is called as "Polymorphism". add(a,b) { return a+b; } add(a,b,c,d) { return a+b+c+d; } variables ========= int a; float a; ==> variables never have many forms while coding. methods ======= subString(): ============ str.subString(start); str.subString(start, end);