Lec 7
Lec 7
1
Object Oriented Programming
Principles of Object Oriented Programming
• The OOP programming is based on the four major fundamental
1. Encapsulation
2. Inheritance
3. Abstraction
4. Polymorphism
4
Principles of Object Oriented Programming
5
Basic Object-Oriented Programming
relationship among each other and objects of one class acquire properties
and features of the other class. The class which inherits the features is
known as the child class, and the class whose features it inherited is called
the parent class. For example, Class Vehicle is the parent class, and Class
Bus, Car, and Bike are child classes.
Data Type: defines the kind of values that can be stored and the
operations that can be performed on the values
7-8
Abstraction in Software Development
data items without concern for how the data items are implemented
The user of an abstract data type (ADT) does not need to know any
implementation details (e.g., how the data is stored or how the operations
7-9
More Object Terms
object
These changes, however are hidden from code outside the object. The code
outside the object does not need to know about the changes made to the object’s
data.
The code outside the object can call and use the member functions exactly the
same way as it did before.