Download presentation
Presentation is loading. Please wait.
1
Object Oriented Programming(OOP)
Use Objects and Classes Program designing is more simple in OOP Dynamic Portable Multithreaded
2
Basic concept of OOP 1- Class 2- Object 3- Inheritance 4- Abstraction
5- Polymorphism 6- Encapsulation
3
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.
4
Example of Class and Object
Color Price Model Object attributes Class Car Object Object Behaviors Run Use Fuel
5
Inheritance One object acquires the properties of another object.
Hierarchical Parents And Child relation. Example Class A Class B
6
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
7
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
8
Furqan Rustam The Islamia University of Bahawalpur
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.