Encapsulation
Submitted by:
Saikat Rahman 171-
15-9504
Biprojith Saha 171-
15-9513
Object means a real word entity such as pen,
chair, table etc. Object-Oriented Programming is a
methodology or paradigm to design a program
using classes and objects. It simplifies the
software development and maintenance by
providing some concepts:
Object
Class
Inheritance
Polymorphism
Abstraction
Encapsulation
Object-Oriented Programming
Encapsulation is one of the fundamentals of
OOP (object-oriented programming). It refers
to the bundling of data with the methods that
operate on that data. Encapsulation is used to
hide the values or state of a structured data
object inside a class.
Encapsulation
Encapsulation helps us in binding the
data(instance variables) and the member
functions(that work on the instance variables) of a
class.
Encapsulation is also useful
in hiding the data(instance variables) of a class from
an illegal direct access.
Encapsulation also helps us to make a flexible
code which is easy to change and maintain.
Use of
encapsulation
Importance Of Encapsulation
 To hide the internal implementation details
of the class
 Can safely modified the implementation
without worrying breaking the existing
code that uses the class
 Protect class against accidental/ willful
stupidity
 Keeps class tidy by keeping the visible
fields to aminimum
 Easier to use and understand
Benefits of Encapsulation
Provides data hiding
Reusability
Code can be modified without
breaking the code.
Hiding implementation details
reduces complexity.
 Encapsulation draws a boundary
around a s et of data and
method.
 This allows a developer to use the
code without having to know how
it works, but with what input data
and its input data range and with
what it returns.
Maintainability
 Makes long term development
easy.
 Updates can be made by changing
the encapsulated part without
changing the input and output
formats.
Extensibility
 Encapsulation makes
the code easier to
visualize.
 This means codes can be
arranged “visually” before
implementing.
Flexibility
Encapsulation

Encapsulation

  • 1.
    Encapsulation Submitted by: Saikat Rahman171- 15-9504 Biprojith Saha 171- 15-9513
  • 2.
    Object means areal word entity such as pen, chair, table etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts: Object Class Inheritance Polymorphism Abstraction Encapsulation Object-Oriented Programming
  • 3.
    Encapsulation is oneof the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a structured data object inside a class. Encapsulation
  • 4.
    Encapsulation helps usin binding the data(instance variables) and the member functions(that work on the instance variables) of a class. Encapsulation is also useful in hiding the data(instance variables) of a class from an illegal direct access. Encapsulation also helps us to make a flexible code which is easy to change and maintain. Use of encapsulation
  • 5.
    Importance Of Encapsulation To hide the internal implementation details of the class  Can safely modified the implementation without worrying breaking the existing code that uses the class  Protect class against accidental/ willful stupidity  Keeps class tidy by keeping the visible fields to aminimum  Easier to use and understand
  • 6.
    Benefits of Encapsulation Providesdata hiding Reusability Code can be modified without breaking the code. Hiding implementation details reduces complexity.
  • 7.
     Encapsulation drawsa boundary around a s et of data and method.  This allows a developer to use the code without having to know how it works, but with what input data and its input data range and with what it returns. Maintainability
  • 8.
     Makes longterm development easy.  Updates can be made by changing the encapsulated part without changing the input and output formats. Extensibility
  • 9.
     Encapsulation makes thecode easier to visualize.  This means codes can be arranged “visually” before implementing. Flexibility