A black box is a term that engineering works like this. First, drop something into the black box. Then, wait while it is up to us “magically transformed” within it. Finally, we received a new result in the same black box The beauty is that it’s all you need to know is how to return a certain entry adadoa not need to understand the magic inside.
* Well, that means anyone, but the object itself needs to know anything about their properties and methods defined and implemented .
* Are the list of items stored in a matrix or a vector? How is the classification, with a fast or a kind of bubble guy? How is a marked selection and how to handle multiple selections ?
* Encapsulation means that the answers to all these questions are private, known only by the object itself .
* What is the benefit this?
* Well, the advantage is that if you want to use a Select box, it is not necessary to address all the complex code that takes care of all the functionality of a select box. Instead, I just put the self-contained, select the object of my application and use .
* This is an incredibly useful concept because it means that it is much easier to understand and change the code because it only need to deal with small pieces of code in a given time. As a developer, there’s no need to address the complexities of selecting the box functionality, just use the thing !
* It is also a good metaphor for the real world, which can be thought of as being composed of encapsulated objects.
* Consider the computer you’re using to read this. Do you know how the CPU? Most likely you do not. But that’s great. It operates independently. And the fact that you do not have to spend time learning of electrical engineering means you are free to spend his time building things “through” the CPU.
Related Posts
- Inheritance between Objects
- Blessed Machine – episode 2
- What women should wear to a job interview – How to dress ?
- Menswear for an Interview – What to wear to a job interview – How to dress ?
- Mojamuto dry for a day, thanks to Telefonica
- OOP, an Introduction to Object-Orientation
- Should you write on request or for yourself ?
- Microsoft reveals Windows Azure, their OS in the clouds …
- JAVA FAQs
- Top Tips for print typography – graphic designer as freelancer
- The freelance is like the pet that you love but shits chairs