A Banking Class Example
Following the tutorials in Educative I wrote my first class with inheritance. It’s basic but it works.
It’s a far cry from what I’ve done previously in C#
and the self
takes some getting used to.
I’m running a pep8
(flake8) plugin in my Vim
to check my code, but there is a fair bit of confusion happening with my autocomplete. It’s messing with my head, particularily here in Goyo
editing mode.
Here’s the class I’ve written, admist all this confusion.
|
|
I’m chuffed to be able to do it through Vim
and run it in a terminal below
the code. Similar experience to VS Code
? Kind of but there’s a feeling of
knowing the how and a little of the why.
Okay, on to Polymorphism.