python:python_misc:oo_fundamentals_with_python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:python_misc:oo_fundamentals_with_python [2018/11/30 18:39] – [Class-based object-orientation] mithat | python:python_misc:oo_fundamentals_with_python [2018/11/30 18:45] (current) – [Instantiation and use] mithat | ||
---|---|---|---|
Line 91: | Line 91: | ||
)) \\ {{..: | )) \\ {{..: | ||
- | 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 // | One way to start building a model for a class is to start listing the public-facing behavior (or the // | ||
Line 212: | Line 212: | ||
a.click(self) | a.click(self) | ||
</ | </ | ||
- | Python' | + | Python' |
==== 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