Week1b - OverviewOf OOP PDF
Week1b - OverviewOf OOP PDF
OOP Features
Object Oriented Programming (OOP) is a programming model where programs are organized around
objects and data rather than action and logic.
OOP allows decomposition of a problem into a number of entities called objects and then builds data
and functions around these objects.
-The software is divided into a number of small units called objects. The data and functions are built
around these objects.
-The data of the objects can be accessed only by the functions associated with that object.
-The functions of one object can access the functions of another object.
Class
- A class is the core of any modern Object Oriented Programming language such as C#.
-A class is a blueprint of an object that contains variables for storing data and functions to
perform operations on the data.
-A class will not occupy any memory space and hence it is only a logical representation of data.
To create a class, you simply use the keyword "class" followed by the class name:
class Employee
Object
-Objects are the basic run-time entities of an object oriented system. They may represent a
person, a place or any item that the program must handle.
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Abstraction
-Abstraction is "To represent the essential feature without representing the background details."
- Abstraction lets you focus on what the object does instead of how it does it.
- Abstraction provides you a generalized view of your classes or objects by providing relevant
information.
- Abstraction is the process of hiding the working style of an object, and showing the information
of an object in an understandable manner.
Encapsulation
- Wrapping up a data member and a method together into a single unit (in other words class) is
called Encapsulation.
- Encapsulation is like enclosing in a capsule. That is enclosing the related operations and data
related to an object into that object.
- Encapsulation is like your bag in which you can keep your pen, book etcetera. It means this is
the property of encapsulating members and functions.
- Encapsulation means hiding the internal details of an object, in other words how an object does
something.
- Encapsulation prevents clients from seeing it’s inside view, where the behavior of the
abstraction is implemented.
Inheritance
Polymorphism
This is an overview of Object Oriented Programming, the different OOP concepts will be thoroughly
discuss as we continue with the course.