Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShilpa Kothari
4,518 Pointsoop
___________is a language mechanism for restricting access to some of the object's components by using visibility keywords. I answer to this I wrote Object oriented programming but it is saying wrong. Please help
3 Answers
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsEncapsulation is the answer.
"Encapsulation is the packing of data and functions into a single component. The features of encapsulation are supported using classes in most object-oriented programming languages, although other alternatives also exist. It allows selective hiding of properties and methods in an object by building an impenetrable wall to protect the code from accidental corruption.In programming languages, encapsulation is used to refer to one of two related but distinct notions, and sometimes to the combination thereof: A language mechanism for restricting access to some of the object's components. A language construct that facilitates the bundling of data with the methods (or other functions) operating on that data.Some programming language researchers and academics use the first meaning alone or in combination with the second as a distinguishing feature of object-oriented programming, while other programming languages which provide lexical closures view encapsulation as a feature of the language orthogonal to object orientation.The second definition is motivated by the fact that in many OOP languages hiding of components is not automatic or can be overridden; thus, information hiding is defined as a separate notion by those who prefer the second definition."
http://dbpedia.org/page/Encapsulation_%28object-oriented_programming%29
Aaron Gill-Braun
180 PointsTry "Object-Oriented Programming"
Shilpa Kothari
4,518 Pointsstill it is saying the answer is wrong.
Shilpa Kothari
4,518 PointsShilpa Kothari
4,518 Pointswonderful explanation. Thank you Shilpa