Skip to content

Revision of OOP#164

Merged
JakobKlotz merged 5 commits into
mainfrom
PythonExtensive]-rework-oop
Feb 12, 2026
Merged

Revision of OOP#164
JakobKlotz merged 5 commits into
mainfrom
PythonExtensive]-rework-oop

Conversation

@verenitas
Copy link
Copy Markdown
Member

Major revision of the OOP chapter and moving the content from GUI to its own chapter.

Looking forward to your feedback - thx for checking :)

major revison of the OOP chapter and moving the content from GUI to its own chapter
@verenitas verenitas requested a review from JakobKlotz February 11, 2026 16:22
Copy link
Copy Markdown
Member

@JakobKlotz JakobKlotz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great cohesive chapter to solidify the students' understanding of the language itself and help us for consecutive courses like Data Science!
Like the info box at the end, brings it all together. Plus I never knew about class attributes, guess I'll have to put them to use in one of my projects. 😄

Comment thread docs/python-extensive/oop.md Outdated
Comment thread docs/python-extensive/oop.md Outdated
Comment thread docs/python-extensive/oop.md Outdated
healer.heal(hero)
hero.show_health()
```
In the last step, we create an enemy called Bowser from the `GameCharacter` class, a hero called Mario from the `Hero` class, and a healer called Toad from the `Healer` class.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since inheritance is such an abstract concept for students, maybe we could emphasize "the power of inheritance" again, after students saw your examples. You've already stated it at the top of the section, but it could be a nice addition.

???+ tip

    Think of the base class `GameCharacter` as the shared template for all 
    characters. The child classes `Hero` and `Healer` inherit everything from 
    this template (the name, health, and show_health() method), but then add 
    their own specialized features on top of it.
    
    This way, you write the common code only once and reuse it everywhere!

What do you think? 😄

Comment thread docs/python-extensive/oop.md Outdated
verenitas and others added 4 commits February 12, 2026 11:52
Co-authored-by: Jakob Klotz <jakob.klotz@mci.edu>
Co-authored-by: Jakob Klotz <jakob.klotz@mci.edu>
Co-authored-by: Jakob Klotz <jakob.klotz@mci.edu>
Included the tip to clarify inheritance concepts - thx for the suggestion :)
@verenitas
Copy link
Copy Markdown
Member Author

Thank you for the fast review and thoughtful response! I really appreciate the suggestions you made to make the code more readable and to nicely sum up the inheritance chapter, I think they greatly improve the overall understanding of the topic 😄

From my side, I’m very happy with the changes and ready to close the pull request. Thanks again!

@JakobKlotz JakobKlotz merged commit 3995036 into main Feb 12, 2026
1 check passed
@JakobKlotz JakobKlotz deleted the PythonExtensive]-rework-oop branch February 12, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants