FINAL ASPECTS OF OOP's
POLYMORPHISM,ENCAPSULATION INHERITANCE TOGETHER When applied properly polymorphism encapsulation and inheritance combine to produce a programming environment tat supports the development of far more robust and scalable programs than process oriented model A well designed hierarchy of classes is the basis of reusing the code in which you have invested time and effort developing and testing Encapsulation allows you to migrate implementations over time without breaking the code that depends on the publioc interface of your class. Polymorphism allows you to create clean,sensible,rsilient code.
Real Life Examples of OOPs All drivers rely on inheritance to drive different types of vehicles(subclass People interface with encapsulated features of a car. Polymorphism is clearly reflected in the ability of car manufacturers to offer a wide variety of options on basically the same vehicle. Here we can see through the application of Inheritance, Encapsulation and Polymorphism the individual parts are transformed into an object called car. In the various parts of a complex program can be brought together to form cohesive, robust program. same way the
DISADVANTAGES It is intrinsically inefficient than a procedural language > They have got all the implicit environment that they carry around them which is not necessary for the user all the time. It requires a lot effort before writing a single piece of code They are slow compared to other programs as it requires a number of resources of the sysrtem and also due to its size Not suitable for all the problems some would require functional procedure, logical procedure.
Some concepts uncovered > Class: it is a collection of objects and entities. Object:An entity having a state and behaviour.lt has three characteristics state,behaviour,identity. New keyword: Used to allocate memory during run time Constructor: Used to initialize an object and provides the data to the object.
Hey everyone,I am Kshethra. I really love explaining to someone it somehow turned up to my passion.I'm really happy to fulfill my passion .