Exemplo n.º 1
0
#!/usr/bin/env python

# Import classes
from Animals import Mammals
from Animals import Birds

# Create mammal
myMammal = Mammals()
myMammal.printMembers()

# Create bird
myBird = Birds()
myBird.printMembers()
Exemplo n.º 2
0
from Animals import Mammals
from Animals import Birds

mymammal = Mammals()
mymammal.printMembers()

mybirds = Birds()
mybirds.printMembers()
Exemplo n.º 3
0
from Animals import Mammals
from Animals import Birds

dog = Mammals()
dog.printMembers()

duck = Birds()
duck.printMembers()
Exemplo n.º 4
0
'''
Created on Dec 7, 2015

@author: sanjeev
'''

from Animals import Mammals
from Animals import Birds

myMammal = Mammals()
myMammal.printMembers()
 
# Create an object of Birds class & call a method of it
myBird = Birds()
myBird.printMembers()
Exemplo n.º 5
0
# Importing classes from animals package
from Animals import Mammals
from Animals import Birds
from Animals import Reptiles


# Creating an object of mammals
myMammal = Mammals()
myMammal.printMembers()

# Creating an object of Birds
myBird = Birds()
myBird.printMembers()

#Creating reptile object
myReptile = Reptiles()
myReptile.printMembers()

#checking to see if we can append to list
test1 = Mammals()
test1.members.append("Lion")

test1.printMembers()