Skip to content
EntityQ1305241· pop 40· linked from 106 articles

language mechanism in programming languages that allows external code not to care about the internal workings of an object

In the Vinony graph

Within Vinony's link graph, 封裝 is referenced by 106 other articles, and connects out to object-oriented programming, International Standard Book Number and C.

It is catalogued under topics including Object-oriented programming and Programming principles.

Its subject is documented across 36 Wikipedia language editions.

Wikidata facts

Show 2 more facts
Sources (2)

via Wikidata · CC0

Article · 中文

在物件導向程式設計方法中,封裝(英語:Encapsulation)是指,一種將抽象性函式介面的實作細節部份包裝、隱藏起來的方法。同時,它也是一種防止外界呼叫端,去存取物件內部實作細節的手段,這個手段是由程式語言本身來提供的。封裝被視為是物件導向的四項原則之一。 適當的封裝,可以將物件使用介面的程式實作部份隱藏起來,不讓使用者看到,同時確保使用者無法任意更改物件內部的重要資料,若想接触資料只能通过公开接入方法(Publicly accessible methods)的方式( 如:"getters" 和"setters")。它可以讓程式碼更容易理解與維護,也加強了程式碼的安全性。

Abstract from DBpedia / Wikipedia · CC BY-SA

Connections

Categories