OOP uses inheritance, via super-classes and sub-classes, and structures code around "what something is". The approach is similar to packing everything each item will need in a box, then only pulling out what is needed when it is needed.
Basic QualitiesOnly a few functions work on common data.
Uses an inheritance model.
Object state can be modified.
Functions use side-effects.
Three potential problems with an inheritance model:Sub-classes might only need (or perhaps should only use) one method, yet they still absorb all methods from the parent classes.
There is potential fragility if changes to a super-class has unforeseen affects on a sub-class.
The state of an object and function side-effects can become difficult to manage as projects get larger.
Functional Programming uses composition, via an MORE q
By
DarkMG73 on April 15th, 2020 in