# Enter a codeclass Animal(object):
def __init__(self,age,name,location):
self.__age = age
self.__name = name
self.__location = location
#Defined the fuction that can get the details
def get_age(self):
return self.__age
def get_name(self):
return self.__name
def get_location(self):
return self.__location
def get_details(self):
print('name:{},age:{},location:{}'.format(self.get_name,self.get_age,self.get_location))
#Defined the fuction that can modify the instance
def set_age(self,age):
self.__age = age
def set_name(self,name):
self.__name = name
def set_location(self,location):
self.__location = location
dog = Animal(18,'Jack','Asia')
print(dog.get_details)