Note: this question is an edited excerpt from a blog posting I wrote a few months ago.  After placing a link to the blog in a comment on Programmers.SE someone requested that I post a question here so that they could answer it.  This posting is my most popular, as people seem to type I don't get object-oriented programming into Google a lot.  Feel free to answer here, or in a comment at Wordpress.What is object-oriented programming?   No one has given me a satisfactory  answer.  I feel like you will not get  a good definition from someone who  goes around saying object and  object-oriented with his nose in the  air. Nor will you get a good  definition from someone who has done  nothing but object-oriented  programming. No one who understands  both procedural and object-oriented  programming has ever given me a  consistent idea of what an  object-oriented program actually does.Can someone please give me their ideas of the advantages of object-oriented programming?
Advantages of object-oriented programming
object oriented
Think of software as a machine or assembly line that exists inside the computer. Some raw materials and components are fed into the machine, and it follows a set of procedures to process them into some final product. The procedures are set up to perform a specific operation on some raw material or component to a specific set of parameters (eg, time, temperature, distance, etc) in a particular order. If the details of the operation to be performed were incorrect, or the machine's sensors aren't correctly calibrated, or if some raw material or component wasn't within expected quality standards, it could change the operation's outcome and the product would not turn out as expected.Such a machine is very rigid in its operation and acceptable inputs. Machines don't question the designers' intelligence nor its current operating environment. It will continue to follow procedures as long as it's directed to. Even if a change in raw materials or components could have a dramatic effect on what happened in later operations, the machine would still perform its procedures. The process would need to be reviewed to see what changes to the procedures were necessary to compensate and produce the desired result. A change to the product's design or configuration might also require a significant change to the operations performed or their order. Although those in charge of production quickly learned the importance of isolating operations as much as possible to reduce undesirable effects between them, a lot of assumptions are made of the condition components are in as they undergo processing; assumptions that might not be detected until the final product is in the hands of the user in some different operating environment.That's what procedural programming is like.What object-orientation provides is a way to remove the assumptions of the condition of components; thus, the operations to be performed on that component and how to integrate it into the final product. In other words, OOP is like taking the process details for dealing with some particular component and giving it to a smaller machine to do. The larger machine responsible for the process tells the component-specific machine which operation it expects to be done but leaves the details for the steps to the component-specific machine to handle.As to the advantages of object-orientation over non-object-oriented software:component-specific behavior - making details on how to handle a particular component the responsibility of the smaller component-specific machine ensures any time that component is handled, its machine will do so appropriately;polymorphic expressions - because component-specific machines performs operations tailored to its particular component, the same message sent to different machines can act differently;type abstraction - it often makes sense for several different types of components to use the same vocabulary for the operations their machines do;separation of concerns - leaving component-specific details to their machines means the process machine only needs to handle the more general, larger concerns of its process and the data required to manage it; plus, it's less likely to be affected by changes in other components;adaptability - components that focus on their area of speciality can be adapted to unforeseen use simply by changing the components it uses, or making it available to another process machine;code reuse - components with a narrow focus and greater adaptability can leverage their development cost by being put to use more often.