User Tools

Site Tools


python:about_python:about_python_iv

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
python:about_python:about_python_iv [2014/02/28 22:18]
mithat [Inheritance]
python:about_python:about_python_iv [2019/06/21 23:09]
mithat [Inheritance in Python]
Line 43: Line 43:
 To demonstrate the use of inheritance in Python, we are going to create a specialized version of ''ClickerCounter'' called ''ClickUpDown''. To demonstrate the use of inheritance in Python, we are going to create a specialized version of ''ClickerCounter'' called ''ClickUpDown''.
  
-<img src="images/clickupdown.png" title="ClickUpDown heirarchy" alt="ClickUpDown heirarchy" />  +{{:python:about_python:clickupdown-tree.png?direct|}} 
  
 In addtion to the two buttons found on a ''ClickerCounter'' (for incrementing and resetting the count), a ''ClickUpDown'' object will add another that resets the count. In terms of a Python model, a ''ClickUpDown'' is identical to a ''ClickerCounter'' except that it has an additional method: ''click_down''. In addtion to the two buttons found on a ''ClickerCounter'' (for incrementing and resetting the count), a ''ClickUpDown'' object will add another that resets the count. In terms of a Python model, a ''ClickUpDown'' is identical to a ''ClickerCounter'' except that it has an additional method: ''click_down''.
python/about_python/about_python_iv.txt · Last modified: 2019/06/21 23:09 by mithat