{"id":198,"date":"2001-05-22T13:50:00","date_gmt":"2001-05-22T21:50:00","guid":{"rendered":"http:\/\/www.netjeff.com\/wp\/?p=198"},"modified":"2007-12-30T23:34:30","modified_gmt":"2007-12-31T07:34:30","slug":"differences-between-encapsulation-and-information-hiding-in-oo-programming","status":"publish","type":"post","link":"https:\/\/www.netjeff.com\/wp\/?p=198","title":{"rendered":"Differences between \"encapsulation\" and \"information hiding\" in OO programming"},"content":{"rendered":"<p>I liked <a href=\"http:\/\/www.javaworld.com\/javaworld\/jw-05-2001\/jw-0518-encapsulation.html\">\"Encapsulation is not information hiding\"<\/a> in the May JavaWorld:<\/p>\n<blockquote><p>The term <em>encapsulation<\/em> is often considered to be interchangeable with <em>information hiding<\/em>. However, not differentiating between these two important concepts deprives Java developers of a full appreciation of either. Encapsulation is a language facility, whereas information hiding is a design principle. This article investigates strengthening class design through careful consideration of each of these concepts.<\/p><\/blockquote>\n<p>The discussion includes a very nice example problem that \"evolves\" through the course of the article to demonstrate the concepts.<\/p>\n<p>Although the examples are in terms of Java, the discussion applies to any OO language, like C++.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I liked \"Encapsulation is not information hiding\" in the May JavaWorld: The term encapsulation is often considered to be interchangeable with information hiding. However, not differentiating between these two important concepts deprives Java developers of a full appreciation of either. Encapsulation is a language facility, <a class=\"more-link\" href=\"https:\/\/www.netjeff.com\/wp\/?p=198\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=198"}],"version-history":[{"count":0,"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/198\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netjeff.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}