Several reasons really.
1) Objects mimic the way we think about the world. We classify everything into an object category and we think of items in terms of an object being either real or theory. We know they have actions (methods) and properties.
2) Object oriented programming also reduces complexity of system design by reducing redundancy (refactoring), hiding facts we do not need to know (encapsulation), and to think of something theoretical as more solid like an electronic file being a paper file.
3) It also helps design systems that are non linear or temporal where one line had to follow another line but before it created this other line.
4) It helps establish relationships between objects where an object can interact with one computer system and turn around and interact with another without needing a code rewrite.
5) It helps with the idea that one thing can extend functionality of another or "inherit" abilities. In a linear structure you would have to write code to check tire pressure for a motorcycle then another for a car when really they are both automobiles and are checked the same way.
6) Related to number 5, it also allows us to use abstractions. Something with a basic functionality but meant to be built on. Frameworks are full of abstractions. You could outline the idea for a wigetmadoo and I can then use it to make a wigetmadoochild. None of this thinking could have been done in structured or "linear" programming.
Hope these ideas help you out. Enjoy!
2007-02-06 06:55:49
·
answer #1
·
answered by Martyr2 7
·
0⤊
0⤋
Object oriented programming developed so that bits and pieces of a large program could be developed by different people. This way you can re-use code in wide variety of programs.
2007-02-06 02:00:31
·
answer #2
·
answered by Kat 3
·
0⤊
0⤋
Object oriented programming is designed to mirror the way we think. When you look at a person you don't think of them as eyes, arms, blood, bones, etc...you see a 'person' object.
Programming-wise, you can take the 'person' object and inherit all it's traits...arms, eyes, etc...AND all it's behaviors...walk, talk, eat, etc.
You create a new person object with the name "Bob" , hair color "Brown", and occupation "Salesman"
So instead of programming arms, legs, blood, bones, etc every time you want to create a person, you merely use your person object and tweak it to the specific needs of your current program.
Does that help?
2007-02-06 02:48:15
·
answer #3
·
answered by rod 6
·
0⤊
0⤋