コード例 #1
0
ファイル: Decorator.py プロジェクト: uyennguyen87/python
 def get_total_cost(self):
     base_cost = DrinkComponent.get_total_cost(self)
     extra_cost = self.component.get_total_cost()
     total_cost = base_cost + extra_cost
     return total_cost
コード例 #2
0
ファイル: Decorator.py プロジェクト: uyennguyen87/python
 def get_description(self):
     return self.component.get_description() + \
         ' ' + DrinkComponent.get_description(self)