13

Two of my friends joined my Programming club and they’re loving it. Even though I am not a professional programmer, I love to teach what I know. One of my friend wrote an Command Line RPG game, but he did it all with spaghetti code (he didn’t even use the switch statement)! I told him that that is not how OOP works. I taught him how objects, methods, encapsulation, abstraction, and inheritance. I couldn’t teach him about polymorphism, because frankly, I don’t know much about it yet. But st the end of the club, he walked away with wonder in his eyes.

Comments
  • 0
    All of that in an hour or so?? Whoah
  • 1
    @ThaOneDude well, I did an overview. I’m planning to teach him the complex parts of it.
  • 1
    If you really made him understand all of that in such little time you earned my respect
  • 1
    What is a professional programmer?
  • 0
    If you understand all that polymorphism shouldn’t be to hard to grasp... its like inheritance but using interfaces. For example an interface describing a shape might have a method to calculate the area and objects square and circle implement the interface which allows shape to be used and passed around instead of working with the concrete types. Callers can use the interface and you can hide the implementation details
  • 2
    @growling someone who gets payed for programming?
  • 0
    @gruff it's not only interfaces inheritance is polymorphism too

    Oracle has a excellent article

    https://docs.oracle.com/javase/...
  • 0
    @koin it is indeed but I always thought that was abstraction and enscapulation
Add Comment