What is inheritance? How is it useful? Discuss 3 advantages and disadvantages of Object Oriented Programming over traditional procedural programming. Solution What is inheritance? How is it useful? Inheriance is the concept of reusing the readily available code. It is building a new set of classes on some existing classes. Instead of re-writing the code again, just using the existing code, and building on top of it. Inheriting the properties of a base class, into a derived class, and ofcourse derived class is allowed to have its own unique properties. d. Advantages of OOP over POP. 1. Object orientation is more secure. Data is not flowing freely over the machine/memory. All the data, and the methods that are allowed to operate on the data are tied together and is called object. 2. Will communicate with outside world or other objects usually through the public methods which are allowed to communicate. 3. Provides some standard template libraries called STLs, so that we can make use of them. Polymorphism, inheritance will make the classes more robust. The disadvantages include: 1. Mostly the objects are abstract, and will restrict to access low-level or hardware level resources directly. 2. OOP programs are slower than POP programs, because of the code they are supposed to compile/run. 3. OOP classes are larger in size when compared to POP raw codes. .