Wednesday, 25 January 2017

ENCAPSULATION IN PYTHON

The concept of binding or grouping related data members along with related functionalities is known as Encapsulation.

Customer
cname, cadd, aacno, cbal, ….
def deposit(self):
          ----
          ----
def withdraw(self):
          ----
          ----
def transfer(self):
          ----
          ----

Employee
ename, eaddr, eid, esal, ….
def da(self) :
          ----
          ----
def hra(self) :
          ----
          ----
def tax(self) :
          ----
          ----


No comments:

Post a Comment