Last active
December 20, 2015 15:09
-
-
Save mushfiq/6152206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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