Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Last active December 20, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mushfiq/6152206 to your computer and use it in GitHub Desktop.
Save mushfiq/6152206 to your computer and use it in GitHub Desktop.
class Train(object):
def __init__(self):
self.speed = 120
class Bus(object):
def __init__(self):
self.speed = 60
class Trum(object):
def __init__(self):
self.speed = 40
class System(object):
def create(self, *args):
return args
class TranspotationSystem(object):
def __init__(self):
self.train = Train()
self.bus = Bus()
self.trum = Trum()
def createTSSyetm(self):
s = System()
t_system = s.create(self.train, self.trum, self.bus)
for t in range(0,len(t_system)):
print t_system[t].speed
if __name__=='__main__':
T = TranspotationSystem()
t = Train()
tr = Trum()
b = Bus()
T.createTSSyetm()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment