<考试时间：2018-12-27（周四） 上午 09:45-11:45， 教室：3C103>
This course is aimed at beginners who have not learnt any programming course or a different language from C++. The course teaches students object-oriented programming (OOP) principles and core methods over C++. Our goal is to guide students to know the philosophy of programming design and the important features of C++ so that they can further self-study others, such as generic programming, design pattern.
The teaching method of this course is to concisely explain most important knowledge points of OOP by real programming and experiments using C++, rather than traditionally introducing all new features one by one. As in most courses, it cannot teach all aspects of C++. Alternatively, we choose to only lecture the important contents that are frequently used in practice. When ending this course, the students are expected to skillfully program mid-level software with C++ to resolve the real problems for research, projects, jobs, etc.
Note that the course is only to guide students programming through principle and practice, and you need and are expected to read more books to learn advanced knowledge if you want to be an expert of C++ Programming. In particular, you may refer to reference books.
Actually, there have been quite many C++ programs developed for various applications in real world. For details, see Stroustrup’s lists or the corresponding Chinese version that provides some typical application scenarios.
If you have any problems, please contact me via E-mail: zlwang AT ustc DOT edu DOT cn or visit my homepage.
We choose the book “Programming: Principles and Practice using C++” (PPP) as the textbook of this course because it is much suitable for beginners and especially emphasizes the practice. The book is written by “the C++ farther” Bjarne Stroustrup, whose another bible book “C++ programming language” is quite classic and can be used for professional study or as a reference handbook.
- A scanned copy of the book;
- Appendix A: C++ Programming Language;
- Appendix B: C++ Standard Library;
- Appendix C: An Introduce to Visual Studio;
- Appendix D: Install FLTK;
- Appendix E: GUI Implementation.
- Standard library include header: std_lib_facilities.h (right click, and then save target as). Students should use “plain”#include “std_lib_facilities.h” where the header file is in the same directory/folder as the .cpp files.
- About configure programming environment for different systems, see details.
- PPP Style Guide for the programming style’s reference in excises and experiments.
- For other coding materials, visit course supporting page and find Supporting code: section
The following slides are associated with the above textbook. Each set of slides corresponds to a book chapter:
- Ch0: Preface
- Ch1 & 2: Welcome to Programming World
- Ch3: Objects, Types, and Values
- Ch4: Computation
- Ch5: Errors
- Ch6: Writing a program, materials: First “mysterious” version calculator example for “Try This”, and Be-bugged calculator example for exercise in debugging
- Ch7: Completing a program, materials: Be-bugged calculator example for exercise in debugging
- Ch8: Technicalities: Functions, etc.
- Ch9: Technicalities: Classes, etc.
- Ch10: Input/Output Streams
- Ch11: Customizing I/O
- Ch12: A Display Model, In addition, we provide An RGB color chart for use with the graphics
- Ch13: Graphics Classes, we provide the support code: Graphics and GUI
- Ch14: Graphics Class Design
- Ch15: Graphing Functions and Data
- Ch16: Graphical User Interfaces
- Ch17: Vector and Free Store
- Ch18: Vectors and Arrays
- Ch19: Vector, Template, and Exceptions
- Ch20: Containers and Iterators
- Ch21: Algorithms and Maps
- Ch22: Ideals and History
- Ch23: Text Manipulation
- Ch24: Numerics, the related implementation: Matrix class
- Ch25: Embedded Systems Programming
- Ch26: Testing
- Ch27: The C Programming Language
Notes: There are many excises after each chapter in book. Students should complete some of them, and here provide some solution.
If you find any error or have improved advise, don’t hesitate to inform me via Email: zlwang AT ustc DOT edu DOT cn.
【Exercise and Experiment】(Wednesday 6:30pm-9:30pm from Oct. 18 )
- std_lib_facilities.h (right click, and save target as)
- Complete collection of code fragments (revised) (contains an automated build of FLTK for Windows) from original course mainpage
- Graphics and GUI support code for Chapters12-16
- Matrix class for Chapter 24
- FLTK source files (fltk-1.1.9-source.tar.gz, fltk-1.1.9-source.zip) from FLTK.org from which you can build the FLTK Graphical User Interface (GUI) library and toolset
- Exp1: Development Environment Setting & Toy Exercises
- Exp2: A Simple Calculator Program
- Exp3: Design a Series of Classes : Library
- Exp4: How to Operate File?
- Exp5: Install FLTK & Drawing a Chessboard
- Exp6: Displaying Temperature Bar
- Exp7: Implementing a Smart Pointer
- Exp8: Define & Test Complex Class
Before finish the course, please review our teaching knowledge and techniques. Now, just have a quick review through this slides including the first twenty chapters.
The examination tasks are listed as follows:
If you have any good idea, don’t hesitate to inform me via email: zlwang AT ustc DOT edu Dot cn. Thank you very much!