The goal of object oriented programming is to use objects to make replace as many actions as possible. Main concepts of OOP are classes and inheritance. Classes help as group together objects with the same properties and assign actions to them. Inheritance allows us to add extra features to our classes and customize them for different tasks without rewriting the code. These tools together obviously make writing complicated code a lot easier. Another cool feature of OOP is that it allows different people to work on different parts of the same problem independently from each other.
Suppose I need to use class written by somebody else o solve some problem. I don't need to understand how every class works to be able to implement it. All I need to know is it's public interface. On the other, person designing this class is free to update it's internal mechanics however he wishes as long as public interface remains the same.
OOP is fun...
No comments:
Post a Comment