Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Building:
- def __init__(self, adress, nb_stairs):
- self.adress = adress
- self.stairs = nb_stairs
- def get_adress(self):
- return self.adress
- def stairs(self):
- return self.stairs
- class Residence(Building):
- def __init__(self, adress, nb_stairs, balcony):
- Building.__init__(nb_stairs,adress,)
- self.nb_balcony = balcony
- def get_nb_balcons(self):
- return self.nb_balcony
- class Supermarket(Building):
- def __init__(self, adress, nb_stairs, nb_rayons):
- Building.__init__(adress, nb_stairs)
- self.nb_rayons = nb_rayons
- def get_nb_rayons(self):
- return self.nb_rayons
- class Bank(Building):
- def __init__(self, adress, nb_stairs, chest, name):
- Building.__init__(adress, nb_stairs)
- self.nb_chest = chest
- self.name = name
- def get_nb_chest(self):
- return self.nb_chest
- def get_name(self):
- return self.name
- #4 buildings
- residence1 = Residence("26 galere de nulle part", 2, 1,)
- #Supermarket
- supermarket1 = Supermarket("33 av des fleurs", 2, 59)
- #Bank
- bank1 = Bank("44 rue ptain merde)", 3,2, "Voleur",)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement