What is “OOP” and whats so great about it?
There are lots of definitions of “object oriented”, “object-oriented programming”, and “object-oriented programming languages”. For a longish explanation of what I think of as “object oriented”, read Why C++ isn’t just an object-oriented programming language. That said, object-oriented programming is a style of programming originating with Simula (about 40 years ago!) relying of encapsulation, inheritance, and polymorphism. In the context of C++ (and many other languages with their roots in Simula), it means programming using class hierarchies and virtual functions to allow manipulation of objects of a variety of types through well-defined interfaces and to allow a program to be extended incrementally through derivation. See What’s so great about classes? for an idea about what great about “plain classes”. The point about arranging classes into a class hierarchy is to express hierarchical relationships among classes and use those relationships to simplify code. To really understand OOP
There are lots of definitions of “object oriented”, “object-oriented programming”, and “object-oriented programming languages”. For a longish explanation of what I think of as “object oriented”, read Why C++ isn’t just and object-oriented programming language. That said, object-oriented programming is a style of programming originating with Simula (about 40 years ago!) relying of encapsulation, inheritance, and polymorphism. In the context of C++ (and many other languages with their roots in Simula), it means programming using class hierarchies and virtual functions to allow manipulation of objects of a variety of types through well-defined interfaces and to allow a program to be extended incrementally through derivation. See What’s so great about classes? for an idea about what great about “plain classes”. The point about arranging classes into a class hierarchy is to express hierarchical relationships among classes and use those relationships to simplify code. To really understand OO