- Due: Friday, June 12th no later than 5pm.
- Submission instructions: complete the assigned number of activities in each of the assigned subsections of Chapter 19. You do not need to submit anything to Brightspace.
- Deadline reminder: once this deadline passes, Runestone Interactive will no longer allow you to collect points for completing the activities.
- Inheritance is a key pillar of object oriented programming that allows us to reuse code without copy and pasting.
- The syntax to have one
- We can override the funcionality of the parent class in the child class by redefining methods.
- We can call methods from the parent class using
- We can also reuse code using composition: storing a reference to an object within a class, rather than inheriting the class.
- It is best to use inheritance when the we can say that the child class is a type of the parent class. Otherwise, use composition.
- Complete the required number of activities for each subsection in Inheritance.
Grading - 10 points
- 10 points - the required number of activities were completed for each subsection before the deadline.
This reading assignment will be graded with scores in Brightspace by office hours the following class day.
Download dungeons.py. Add an
Elf class that is a subclass of
Character. Make an elf’s dexterity and wisdom 3 greater than the default.