- There is no new reading for today.
- Terminology: One class can inherit the state variables and methods
from another class. This is known as inheritance.
- For example, the class student is a subclass of person.
For example, the class teacher is a subclass of person.
- The program dungeons.py illustrates
the concept of inheritance in the context of Dungeons and Dragons.
Make sure you fully understand this example.
- Draw a picture of the inheritance hierarchy.
- Modify the Dungeons and Dragons program to enable another
character type (such as an elf or a dwarf) to be created.
Test your program to make sure that it works properly.
- Add appropriate comments to the program. Ask someone
to check that you have done so in an appropriate manner.
- Make an additional interesting enhancement to the program.