aboutsummaryrefslogtreecommitdiff
path: root/files/ja/glossary/abstraction/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/glossary/abstraction/index.html')
-rw-r--r--files/ja/glossary/abstraction/index.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/files/ja/glossary/abstraction/index.html b/files/ja/glossary/abstraction/index.html
new file mode 100644
index 0000000000..7dee5c0efb
--- /dev/null
+++ b/files/ja/glossary/abstraction/index.html
@@ -0,0 +1,50 @@
+---
+title: Abstraction (抽象化)
+slug: Glossary/Abstraction
+tags:
+ - Abstraction
+ - Coding
+ - CodingScripting
+ - Glossary
+ - Programming Language
+translation_of: Glossary/Abstraction
+---
+<p>{{Glossary("Computer_Programming", "コンピュータープログラミング")}}における抽象化とは、複雑なソフトウェアシステムにおいて、複雑さを軽減し、また効率的な設計と実装を可能にする方法です。これはシステムの技術的な複雑さを、{{Glossary("API")}} の背後に隠します。</p>
+
+<h2 id="Advantages_of_Data_Abstraction" name="Advantages_of_Data_Abstraction">データ抽象化の利点</h2>
+
+<ul>
+ <li>ユーザーが低レベルコードを書くのを避けるのに役立つ。</li>
+ <li>コードの重複を避けて再利用性を上げる。</li>
+ <li>クラスの内部実装をユーザーに影響することなく独立して変更できる。</li>
+ <li>重要な詳細情報だけがユーザーに提供されているため、アプリケーションやプログラムのセキュリティ向上に役立つ。</li>
+</ul>
+
+<h2 id="Example" name="Example"><strong>例</strong></h2>
+
+<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">class</span> <span class="class-name token">ImplementAbstraction</span> <span class="punctuation token">{</span>
+ <span class="comment token">// method to set values of internal members</span>
+ <span class="keyword token">set</span><span class="punctuation token">(</span>x<span class="punctuation token">,</span> y<span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="keyword token">this</span><span class="punctuation token">.</span>a <span class="operator token">=</span> x<span class="punctuation token">;</span>
+ <span class="keyword token">this</span><span class="punctuation token">.</span>b <span class="operator token">=</span> y<span class="punctuation token">;</span>
+ <span class="punctuation token">}</span>
+
+ <span class="function token">display</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span><span class="string token">'a = '</span> <span class="operator token">+</span> <span class="keyword token">this</span><span class="punctuation token">.</span>a<span class="punctuation token">)</span><span class="punctuation token">;</span>
+ console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span><span class="string token">'b = '</span> <span class="operator token">+</span> <span class="keyword token">this</span><span class="punctuation token">.</span>b<span class="punctuation token">)</span><span class="punctuation token">;</span>
+ <span class="punctuation token">}</span>
+<span class="punctuation token">}</span>
+
+<span class="keyword token">const</span> obj <span class="operator token">=</span> <span class="keyword token">new</span> <span class="class-name token">ImplementAbstraction</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+obj<span class="punctuation token">.</span><span class="function token">set</span><span class="punctuation token">(</span><span class="number token">10</span><span class="punctuation token">,</span> <span class="number token">20</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+obj<span class="punctuation token">.</span><span class="function token">display</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+<span class="comment token">// a = 10</span>
+<span class="comment token">// b = 20</span></code></pre>
+
+<h2 id="Learn_more" name="Learn_more">詳細情報</h2>
+
+<h3 id="General_knowledge" name="General_knowledge"><strong>基礎知識</strong></h3>
+
+<ul>
+ <li>Wikipedia 上の記事 「{{interwiki("wikipedia", "抽象化_(計算機科学)")}}」</li>
+</ul>