User Tools

Site Tools


python:python_misc:oo_fundamentals_with_python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python:python_misc:oo_fundamentals_with_python [2018/11/30 18:39] – [Class-based object-orientation] mithatpython:python_misc:oo_fundamentals_with_python [2018/11/30 18:45] (current) – [Instantiation and use] mithat
Line 91: Line 91:
 )) \\ {{..:about_python:tottycounter.jpg?234|}} )) \\ {{..:about_python:tottycounter.jpg?234|}}
  
-In case you've never seen this bit of advanced technology before, it's a clicker-counter or tally-counter. It has two controls: a button you click to advance the counter by one and another you press to reset the count to zero. Our goal is to build one of these in software using object-orientation.+In case you've never seen one of these bits of advanced technology before, it's a clicker-counter or tally-counter. It has two controls: a button you click to advance the counter by one and another you press to reset the count to zero. Our goal is to build one of these in software using object-orientation.
  
 One way to start building a model for a class is to start listing the public-facing behavior (or the //interface//) you want an object of that class to have. A pretty comprehensive list of the things you might do with a clicker-counter is: One way to start building a model for a class is to start listing the public-facing behavior (or the //interface//) you want an object of that class to have. A pretty comprehensive list of the things you might do with a clicker-counter is:
Line 212: Line 212:
 a.click(self) a.click(self)
 </code> </code>
-Python's inner workings manage the fist parameter automatically and implicitly.+Python's inner workings manage the fist parameter (i.e., ''self''automatically and implicitly.
  
 ==== Parameterized constructors and methods ==== ==== Parameterized constructors and methods ====
python/python_misc/oo_fundamentals_with_python.txt · Last modified: 2018/11/30 18:45 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki