I missed class last week due to feeling unwell so I'll discuss my experience with object orientated programming.
I first learned about object orientated programming when I first started to learn programming in high school. It was describe to me as the four pillars of object orientated programming; abstraction, encapsulation, inheritance, and polymorphism. While we haven't yet referred to object orientated programming as with respect to the "four pillars" we have at least briefly talked about them.
We have specifically talked about abstraction (abstract data types) and inheritance (subclass). We have sort of merged inheritance and polymorphism. Polymorphism is when a subclass can share functionality with it's parent class and also define functions of it's own. However but not vice versa. We have already exploited this multiple times without discussing it as it's own characteristic of OOP.
We have only very briefly and simplistically discussed encapsulation. The best way I can think to describe encapsulation is that your putting a "shell" around objects to simplify their uses. This shell separates, or encapsulates, objects, functions, and data from one another. One of the most, if not the most common uses of encapsulation is that of data hiding. Encapsulation does not mean data hiding, but it allows for it.
I think it's very important to talk about the four pillars of object orientated programming. When I was first learning about these "four pillars" I found it very difficult to wrap my head around. But as I gained more experience as a programmer it opened my eyes to how important these characteristics of OOP actually are.
No comments:
Post a Comment