理工学部Faculty of Science and Engineering
COT100XE(計算基盤 / Computing technologies 100)プログラミング言語C++Programming Language C++
彌冨 仁Hitoshi IYATOMI
授業コードなどClass code etc
学部・研究科Faculty/Graduate school | 理工学部Faculty of Science and Engineering |
添付ファイル名Attached documents | |
年度Year | 2023 |
授業コードClass code | H4020 |
旧授業コードPrevious Class code | |
旧科目名Previous Class title | |
開講時期Term | 秋学期授業/Fall |
曜日・時限Day/Period | 金2/Fri.2 |
科目種別Class Type | |
キャンパスCampus | 小金井 |
教室名称Classroom name | 小西館‐W306 |
配当年次Grade | 1年 |
単位数Credit(s) | |
備考(履修条件等)Notes | |
他学部公開科目Open Program | |
他学部公開(履修条件等)Open Program (Notes) | |
グローバル・オープン科目Global Open Program | |
成績優秀者の他学部科目履修制度対象Interdepartmental class taking system for Academic Achievers | |
成績優秀者の他学部科目履修(履修条件等)Interdepartmental class taking system for Academic Achievers (Notes) | |
実務経験のある教員による授業科目Class taught by instructors with practical experience | |
SDGsCPSDGs CP | |
アーバンデザインCPUrban Design CP | |
ダイバーシティCPDiversity CP | |
未来教室CPLearning for the Future CP | |
カーボンニュートラルCPCarbon Neutral CP | |
千代田コンソ単位互換提供(他大学向け)Chiyoda Campus Consortium | |
カテゴリー<理工学部>Category |
応用情報工学科 学科専門科目 |
すべて開くShow all
すべて閉じるHide All
Outline (in English)
【outline and objectives】
The prerequisite subject of this course is C language.
In this course, you will learn the basics of C++ language incorporating object-oriented programming. You will grasp the given problem in the logical structure and will acquire the ability to solve those problems.
【method】
For those who have already mastered C, this lecture will focus on understanding the concept of object-oriented programming and the differences between C++ and C. The lecture will include explanations followed by exercises.
Classes could be online. Changes in the lecture plan due to this shift will be announced on the learning support system.
【goal】
To understand object-oriented programming (encapsulation, polymorphism, inheritance), which is an important difference from C to C++. In addition, students will gain an understanding of program creation policies and formats that differ from the C language, and develop the ability to create C++ programs using these policies and formats.
【learning outside the classroom】
Complete the homework assigned almost every class. Read the textbook and handouts carefully to confirm what will be covered in the next class. Although the scope of the C language is not covered in the class, it is assumed that the students have a good understanding of it, so review the material as necessary.
【grading criteria】
Each assignment (40%)
Final exam (60%)
授業で使用する言語Default language used in class
日本語 / Japanese
授業の概要と目的(何を学ぶか)Outline and objectives
C言語既修者を対象に、オブジェクト指向の要素を取り入れたC++言語の基礎を学び、与えられた問題を論理的な構造の中で捉え、プログラムを作成することで解決できるような素養を身につける。
到達目標Goal
C言語からC++言語への重要な差分である、オブジェクト指向(カプセル化、ポリモーフィズム、継承)について理解する。またC言語と異なるプログラム作成方針、書式について理解し、それらを用いたC++プログラム作成能力を養成することを目標とする。
この授業を履修することで学部等のディプロマポリシーに示されたどの能力を習得することができるか(該当授業科目と学位授与方針に明示された学習成果との関連)Which item of the diploma policy will be obtained by taking this class?
ディプロマポリシーのうち、「DP1」と「DP2」と「DP4」に関連
授業で使用する言語Default language used in class
日本語 / Japanese
授業の進め方と方法Method(s)(学期の途中で変更になる場合には、別途提示します。 /If the Method(s) is changed, we will announce the details of any changes. )
C言語既修者を対象に、オブジェクト指向の概念の理解およびその他C言語との違いに絞った講義を行う。C言語そのものの内容は授業内では扱わないので必要に応じて各自復習すること。講義では、解説に引き続き演習時間を設けることでC++言語を体得できるようにする。
アクティブラーニング(グループディスカッション、ディベート等)の実施Active learning in class (Group discussion, Debate.etc.)
なし / No
フィールドワーク(学外での実習等)の実施Fieldwork in class
なし / No
授業計画Schedule
授業形態/methods of teaching:対面/face to face
※各回の授業形態は予定です。教員の指示に従ってください。
第1回[対面/face to face]:導入
・講義概要
・プログラム開発環境の整備
・C++の概要 -オブジェクト指向プログラミングとは
第2回[対面/face to face]:クラスの概要
・クラスとは
・コンストラクタとデストラクタ
・クラス、構造体、共用体との関連
・インライン関数
第3回[対面/face to face]:クラスの詳細
・オブジェクトの代入
・関数とオブジェクト
・フレンド関数
第4回[対面/face to face]:配列・ポインタ
・オブジェクトの配列とポインタ
・thisポインタ
・newとdelete
第5回[対面/face to face]:参照
・参照(導入のメリット、ポインタとの違い他)
第6回[対面/face to face]:関数オーバーロード
・コンストラクタのオーバーロード
・コピーコンストラクタ
・デフォルト引数
第7回[対面/face to face]:演算子オーバーロード
・演算子オーバーロードの概要
・2項演算子、関係演算子など各種演算子のオーバーロード
第8回[対面/face to face]:継承
・基本クラスのアクセス制御
・被保護メンバ(protected)の使用
・コンストラクタ、デストラクタ、継承
・多重継承
・仮想基本クラス
第9回[対面/face to face]:テンプレートと例外処理
・汎用関数と汎用クラス
・例外処理
・new演算子の例外処理
第10回[対面/face to face]:標準テンプレートライブラリ (STL)
・標準テンプレートライブラリの概要
・コンテナクラス
・vector, ,map, STLアルゴリズム、
・stringクラス
第11回[対面/face to face]:仮想関数 (virtual function)
・派生クラスへのポインタ
・仮想関数の概要と詳細
・ポリモーフィズム(polymorphism)の応用
第12回[対面/face to face]:実行型情報とキャスト演算子、名前空間、変換関数、その他の機能
・実行時型情報
・各種キャスト
・名前空間
・変換関数の作成
・staticクラス、constメンバ関数
第13回[対面/face to face]:・初期化子リスト(C++11)
・オブジェクト指向プログラミングの例
・初期化子リストによるコンストラクタの書き方
・オブジェクト指向のメリットを生かした実例
第14回[対面/face to face]:まとめ
まとめ
授業時間外の学習(準備学習・復習・宿題等)Work to be done outside of class (preparation, etc.)
【本授業の準備・復習等の授業時間外学習は、4時間を標準とする】教科書および配られた配付資料を熟読し,次の授業で行う内容を確認すること。またC言語の範囲は授業で扱わないが、理解しているとみなして授業を進めるので必要に応じて復習を行うこと。また、演習問題なども自分で解いてみて、不明な箇所を明確にしておく。毎回出されたプログラムの課題を復習して、前回の授業内容を完全に理解すること
テキスト(教科書)Textbooks
・「独習C++ 第4版」 ハーバート・シルト著 神林靖監修 翔泳社
(新版ではありません。注意してください。第4版を購入してください)
・授業時に配布される資料
参考書References
・「ストラウストラップのプログラミング入門 – C++によるプログラミングの原則と実践」Bjarne
成績評価の方法と基準Grading criteria
・毎回の課題 (40%)
・期末試験 (60%)
学生の意見等からの気づきChanges following student comments
オブジェクト指向について理解を深められるよう努力する。
実践的な課題を行う
教科書の重要な部分を絞る他、教科書にない部分についても重要箇所は導入する。
学生が準備すべき機器他Equipment student needs to prepare
ノートパソコン
その他の重要事項Others
オンラインでの開講となった場合、オンライン授業の方法や授業計画の変更、成績評価方法の変更などについては、学習支援システムでその都度提示する。担当教員から学習支援システムを通じた連絡がないか、日ごろからよく確認すること。
国内外での企業実務経験、医学部や海外大学での研究経験を持つ教員が、その経験を活かし、研究や実務面での応用を踏まえた上で講義を行う。