OPUCT OOP14 05/29

1
ref. @refiute

Simula64→Smalltalk→C++/Java/Ruby/Python #opuct_oop14

2014-05-29 13:18:48
ref. @refiute

今使われている多くの言語がOOPを取り入れている #opuct_oop14

2014-05-29 13:20:21
ref. @refiute

再利用性の向上・コードの短縮・他人との意思疎通に使える(?) #opuct_oop14

2014-05-29 13:21:17
ref. @refiute

オブジェクト指向の前に構造化プログラミングがあった #opuct_oop14

2014-05-29 13:22:44
ref. @refiute

順次、反復、分岐の3要素でプログラムを構成する方法、エドガー・ダイクストラが考えた。ダイクストラ法で有名 #opuct_oop14

2014-05-29 13:23:29
ref. @refiute

構造化プログラミングで解決できない問題 #opuct_oop14

2014-05-29 13:23:53
ref. @refiute

構造化プログラミングではグローバル変数がどこから参照されるのかわからないというグローバル変数の問題があった #opuct_oop14

2014-05-29 13:25:41
ref. @refiute

本講義ではカプセル化・継承・ポリモーフィズムをOOPの基本要素とする #opuct_oop14

2014-05-29 13:26:58
ref. @refiute

オブジェクトはデータとデータを操作するための関数から構成される #opuct_oop14

2014-05-29 13:28:44
ref. @refiute

クラスはオブジェクトのひな形で、インスタンスはオブジェクトの実体 #opuct_oop14

2014-05-29 13:29:13
ref. @refiute

クラスの特徴 ・データとデータに対する関数をまとめる ・外部から変数・関数を隠蔽する(=カプセル化) ・クラスをひな形として個別のデータを持つインスタンスを生成できる ・継承できる #opuct_oop14

2014-05-29 13:30:38
ref. @refiute

メンバ変数・メンバ関数にはそれぞれpublic,private,protectedがある #opuct_oop14

2014-05-29 13:31:47
ref. @refiute

インスタンス生成時に呼ばれるインスタンス初期化のためのものがコンストラクタ #opuct_oop14

2014-05-29 13:32:16
ref. @refiute

インスタンス破棄時に呼ばれるデストラクタもあるが講義ではやらない #opuct_oop14

2014-05-29 13:32:51
ref. @refiute

private変数はメンバ関数からしか参照できない ・クラスの中で閉じたグローバル変数のようなもの ・private変数を用いでデータを隠ぺいするのがカプセル化 #opuct_oop14

2014-05-29 13:34:04
ref. @refiute

public変数はどこからでも参照できる ・グローバル変数と大差ない #opuct_oop14

2014-05-29 13:34:24
ref. @refiute

演習3,4(Position型のやつ)がわかれば大丈夫 #opuct_oop14

2014-05-29 13:34:58
ref. @refiute

継承とはあるクラスの定義を雛形として新たなクラスを定義するためのもの #opuct_oop14

2014-05-29 13:37:15
@bakkuha2

GOTOレズプログラミング

2014-05-29 13:39:01
ref. @refiute

基本クラスと派生クラス #opuct_oop14

2014-05-29 13:39:05
ref. @refiute

派生クラスは基本クラスのすべてのメンバ変数、メンバ関数を継承する #opuct_oop14

2014-05-29 13:40:03
ref. @refiute

protectedメンバ変数、メンバ関数は派生クラスからのみ参照可能 #opuct_oop14

2014-05-29 13:41:19
ref. @refiute

public,private,protectedをアクセス指定子と呼ぶ #opuct_oop14

2014-05-29 13:42:22
ref. @refiute

大体こんな感じギャグマンガ日和 #opuct_oop14

2014-05-29 13:45:23