Encapsulation (computer programming): Difference between revisions

Content deleted Content added
unbold second instance of encapsulation
USOUS (talk | contribs)
The link is not functional anymore. I deleted the URL from the citation.
Line 184:
myCard.isAvailable(101) // false
</syntaxhighlight>-->
Encapsulation is also possible in non-object-oriented languages. In [[C (programming language)|C]], for example, a structure can be declared in the public API via the header file for a set of functions that operate on an item of data containing data members that are not accessible to clients of the API with the <code>extern</code> keyword.<ref>{{cite book |last1=King |first1=K. N. |url= |title=C Programming: A Modern Approach |date=2008 |publisher=W. W. Norton & Company |isbn=978-0393979503 |page=464 |edition= 2nd |urlpage=https://www.stormingrobots.com/prod/tutorial/pdf/kingBook-ch1to10.pdf |access-date=1 November 2019464}}</ref><ref>King, Kim N. ''C programming: a modern approach''. WW Norton & Company, 2008. Ch. 18, p. 464, {{ISBN|0393979504}}</ref>
<syntaxhighlight lang="c">
// Header file "api.h"