- 1

What is the significance of OOP in python?

23rd Oct 2021, 12:12 PM
Opeyemi Oyeleke
Opeyemi Oyeleke - avatar
3 Réponses
0
Generally oop makes it so you can add,modify,remove functionality to existing code without altering the existing code if you write only functinal code...if you need to add something then all functions need to be rewritten...read a book on opp holy grale...which is "design patterns " like adapter,composite,singleton,bridge,watcher,visitor,abstract factory, strategy,template method
23rd Oct 2021, 12:54 PM
YT| bill2424 | SecurityDude41
YT| bill2424 | SecurityDude41 - avatar
0
it stands for object oriented programming, and basically it means that you will be solving problems from the perspective that you create an object (for example a Player class) and then develop that object to have certain atributes (for example health of a player, power lvl, different skills, name) and let the object behave by a certain logic ( like that if it receives the input "arrow up" it will jump) and this way you are able to keep adding new logic and functionality by just expanding the methods of your class(growing the complexity of your object)... so basically the object orientation is just a description of how the different functions in your code see each other. basically the classes are the objects, and the methods are the hands and the feet of those objects , and functions are like disconnected body parts that dont see the object, so if you cut off a method from an object that it cant see it, it will become a parentless naked function 🥸
23rd Oct 2021, 12:55 PM
Peter Kuik
Peter Kuik - avatar
0
Design patterns and there interactions by oop code make code mobile
23rd Oct 2021, 12:57 PM
YT| bill2424 | SecurityDude41
YT| bill2424 | SecurityDude41 - avatar