345449.vhj5l3oj7.asia CoffeeShop.py 2001-12-26T16:00:00Z 2001-12-26T16:00:00Z <br/><TEXTAREA name="code" class="py" rows="16" cols="100">#: cX:decorator:nodecorators:CoffeeShop.py # Coffee example with no decorators class Espresso: pass class DoubleEspresso: pass class EspressoConPanna: pass class Cappuccino: def __init__(self): self.cost = 1 self.description = &quot;Cappucino&quot; def getCost(self): return self.cost def getDescription(self): return self.description class CappuccinoDecaf: pass class CappuccinoDecafWhipped: pass class CappuccinoDry: pass class CappuccinoDryWhipped: pass class CappuccinoExtraEspresso: pass class CappuccinoExtraEspressoWhipped: pass class CappuccinoWhipped: pass class CafeMocha: pass class CafeMochaDecaf: pass class CafeMochaDecafWhipped: def __init__(self): self.cost = 1.25 self.description = \ &quot;Cafe Mocha decaf whipped cream&quot; def getCost(self): return self.cost def getDescription(self): return self.description class CafeMochaExtraEspresso: pass class CafeMochaExtraEspressoWhipped: pass class CafeMochaWet: pass class CafeMochaWetWhipped: pass class CafeMochaWhipped: pass class CafeLatte: pass class CafeLatteDecaf: pass class CafeLatteDecafWhipped: pass class CafeLatteExtraEspresso: pass class CafeLatteExtraEspressoWhipped: pass class CafeLatteWet: pass class CafeLatteWetWhipped: pass class CafeLatteWhipped: pass cappuccino = Cappuccino() print (cappuccino.getDescription() + &quot;: $&quot; + `cappuccino.getCost()`) cafeMocha = CafeMochaDecafWhipped() print (cafeMocha.getDescription() + &quot;: $&quot; + `cafeMocha.getCost()`) #:~</TEXTAREA><br><br/><script type="text/javascript"><!--google_ad_client = "pub-9426659565807829";google_ad_slot = "9359905831";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> 2001-12-26T16:00:00Z