2. CONCEPTS OF OOP
• Class
• object
• Inheritance
• Abstraction
• Encapsulation
• Polymorphism
3. CLASS
• A class is a collection of objects of similar type.
• Example:-
mango, apple and orange are members of the
class fruit.
• Classes are user-defined data type and built-
in type of a programming language.
• fruit mango:
will create an object mango belonging to the
class fruit
4. OBJECT
• Object are the basic run time entity in an
object –oriented system.
• They may represent a person, a place, a bank
account, a table of data or any item that
program has handle.
5. Example of objects
OBJECT: emp
DATA :
Emp_no
Name
Age
Salary
FUNCTIONS :
Getdata (input)
Total (find total
salary)
Display (output)
6. INHERITANCE
It is the capability of one class to inherit
properties from another class.
5 types of inheritance
Single level
Multilevel
Multiple
Hierarchical
Hybrid
10. ABSTRACTION
Definition- The act of representing essential
features without including the background details
or explanations.
• Classes uses the concept of abstraction and are
defined list of abstract attributes.
• The attributes are sometime called as data
members because they hold information.
• The function that operates on these data are
sometimes called methods or member function.
11. ENCAPSULATION
• Definition :- The wrapping up of data and
functions into a single unit.
• Data encapsulation is the most striking
feature of class.
• Encapsulation means that some or all of an
object's internal structure is "hidden" from
the outside world.
14. ADVANTAGES OF OOP
• Through inheritance, we can eliminate code and
extend the use of existing classes.
• Reusability.
• Easy to understand.
• Models the real world well.
• The principle of data hiding helps the programmer to
build secure programs.
• Software complexity can be easily managed.
15. • It is essay to partition the work in a project based on
object.
• Software complexity can be easily managed.
• Object –oriented system can be easily upgraded from
small to large system.