+ 2
Main advantage of Oops
Hi I want to know that why object oriented programming is used nearly everywhere and also what is the advantages of using it
3 Réponses
+ 1
if you have group of (different) objects inherited from one class and all of this objects need new feature, you don't have to rewrite them all, just change their class.
If you need new similar object, you don't have to programming it from zero, or copy a long code multiple times and maintenance separately, just inherit similar class.
Data for object (like variables) and methods that use them are grouped together, it is useful in big project, where there can be same names for variables/ methods in different contexts, and it is in overview.
Parts of functional code are independently and easy usable again in other codes.
Disadvantages are little higher memory and performance demands.
+ 2
Thanks
0
write acod for a user defined function which calculates the prod uct of four variable