Object Oriented Programming(OOP) Use Objects and Classes Program designing is more simple in OOP Dynamic Portable Multithreaded
Basic concept of OOP 1- Class 2- Object 3- Inheritance 4- Abstraction 5- Polymorphism 6- Encapsulation
Object Class Object is anything from real world like, Mobile , car ,pen , etc. Every object have some functionality and attributes. Class Class is a template for object. Class contain object behavior and attribute. Object is a instance of class.
Example of Class and Object Color Price Model Object attributes Class Car Object Object Behaviors Run Use Fuel
Inheritance One object acquires the properties of another object. Hierarchical Parents And Child relation. Example Class A Class B
Abstraction and Polymorphism Abstraction hide inner detail of any function from user . Polymorphism allow us to declare different method with same name. Reduce complexity. Method Overloading
Encapsulation Save data from external interference. Encapsulate data in a capsule Binds Data Protective wrapper that prevents the code and data from being arbitrarily accessed by other code. Attribute and methods
Furqan Rustam The Islamia University of Bahawalpur