RSS feed
[root]
/
c03
/
code
/
TI Pattern
/
software design
/
document
login:
password:
title search:
Search this site
Enter your search terms
Web
www.carfield.com.hk
Submit search form
Prev
Next
Wed Dec 26 16:00:00 GMT 2001
TemplateMethod
#: c03:TemplateMethod.py # Simple demonstration of Template Method. class ApplicationFramework: def __init__(self): self.__templateMethod() def __templateMethod(self): for i in range(5): self.customize1() self.customize2() # Create a "application": class MyApp(ApplicationFramework): def customize1(self): print "Nudge, nudge, wink, wink! ", def customize2(self): print "Say no more, Say no more!" MyApp() #:~
(google search)
(amazon search)
1
2
3
second
download zip of files only
Prev
Next