

When I was first into OOP many years ago, I found these to only abstract the domain even further. I mean, all those analogies like Car.startEngine() are, let's face it - pure rap. I'd just tell them to sign up for a course in OOP if they really want to understand it. I don't really think that the non-technical person is concerned too much with technical terminology such as "Abstraction," "Composition," "Polymorphism," etc, but if they are, the language I used in the canned statement allows me to pull examples based on it. > This statement is usually sufficient to stave off their curiosity (or perhaps bores them to tears), but if they have more questions, the above statement (I believe) lays a decent foundation for where the conversation can go. Object Oriented programming provides a means to accurately represent these "real world concepts" and "business logic".
#JAVA OOPS CONCEPTS WIKI SOFTWARE#
There exists very complicated "business logic" that needs to get represented in the software that our organization uses. Consider business processes that go on in our organization. There are themes in reality that often need a way to be represented, such as interactions between "things," categorization of things, etc. Human Beings often have interactions with other types of "things," whether they be animals, other humans, other living organisms, or inanimate objects. Speaking and Walking can come in different varieties, such as what language one is speaking, or the speed or manner at which one is walking. For instance, a human being often has arms and legs, hair color, ethnicity, and can often Speak and Walk. The "things" in reality have attributes and behaviors.
#JAVA OOPS CONCEPTS WIKI CODE#
There's lots of ways to program, and one of the most common ways to program is object oriented programming, where the code we build is specifically designed to replicate the concepts of reality. Sometimes we need to build custom representations of reality into new or existing applications that reflect our business processes. There's a lot of tools and devices that exist that do this already - think about how a spreadsheet makes it easier for us to represent accounting or statistics, or how a Powerpoint presentation allows us to store and display our presentations. Programming is an attempt to create a representation of reality on the computer. Here is some version of my canned answer that I give to the ultra non-technical person: Now, partial template specialization, on the other hand. Vehicles don't have to be manned, for example (drones), but would a programmer have thought of the operator of the vehicle as a property of it? I am not saying it is right or wrong to have an operator mentioned, but it causes us to think about what we are modelling and what we are trying to achieve when we develop software.

In fact, I have found in conversations with non-technical people things I had never thought of. But when I compare OOP to real-life objects, most people always get it. We can talk about behavior and where that should live in our tree of objects.ĭepending on their education and background, some get it faster than others. They even understand polymorphism, "Sure, they basically do the same, but that might do it slightly different.". They understand inheritance ("Yeah, a car is a vehicle, a truck is a vehicle, but a car is not a truck, it's SIMPLE, duh!"). We've divided up the properties of each in to the right areas. Soon, after lots of discussion, the other person generally has identified:Īll without any technicalities. Then I'll ask, ok, so what does a Car have?
#JAVA OOPS CONCEPTS WIKI DRIVER#
Soon, we know what a Vehicle is and I said that in OOP we would define a vehicle, and for the sake of argument say it can move, and give it a driver of sorts. Then I'll ask them to forget about a car, or a truck and just ask them to continue to describe a vehicle: Sometimes they mention size, sometimes the purpose, and other things. Then I'll ask what the differences are between a car and a truck. Sometimes they say things like "Well, like a car or a truck", and I'll nod and agree with them. I'll ask the person to tell me what he or she thinks a vehicle is. I generally try and describe Object-Orientated-Programming by using real world examples.įor example, I might say that a class called Vehicle describes the minimum things that a vehicle is.
