コンテンツにスキップ

抽象化 (計算機科学)

出典: フリー百科事典『ウィキペディア(Wikipedia)』

: Abstraction



使

[]


10





Joel Spolsky

言語機能[編集]

プログラミング言語[編集]


:

C++Java virtual  abstract 使沿



Linda

[]


UML

制御抽象化[編集]


使12使

a := (1 + 2) * 5

12351515 "a"  "15"  "a" 

212

構造化プログラミング[編集]




11





退






データ抽象化[編集]




2



AdaModula-2

オブジェクト指向プログラミングでの抽象化[編集]




//

Self使

C++C++



JavaAnimal
class Animal extends LivingThing {
    Location loc;
    double energyReserves;

    boolean isHungry() {
        if (energyReserves < 2.5) { return true; }
        else { return false; }
    }
    void eat(Food f) {
        // Consume food
        energyReserves += f.getCalories();
    }
    void moveTo(Location l) {
        // Move to new location
        loc = l;
    }
}

この定義で、Animal型のオブジェクトを生成し、以下のようにメソッドを呼び出すことができる:

thePig = new Animal();
theCow = new Animal();
if (thePig.isHungry()) { thePig.eat(tableScraps); }
if (theCow.isHungry()) { theCow.eat(grass); }
theCow.moveTo(theBarn);

AnimalLivingThing  Animal 

DailyAnimal Animal 

2使便

オブジェクト指向設計[編集]




/// Animal DairyAnimal 

[]




使 nn 






[]


使

データベースシステム[編集]














1

[]








使

[]


Abelson, Harold, Gerald Jay Sussman with Julie Sussman. (1996) ISBN 0-262-01153-0 Structure and Interpretation of Computer Programs (Second edition). The MIT Press (See [1])

Joel Spolsky. The Law of Leaky Abstractions. 2002-11-11.

2008111Free On-line Dictionary of ComputingGFDL 1.3RELICENSING() 

関連項目[編集]