C++ Programming  (2012 Spring Advancd Class)

 

Goals

(1) Understand the fundamental conceptions of C++ language, including data type, control statements, functions, array, pointer, …;
(2) Understand the principles of object-oriented software design, including Class, object, Inheritance, …;
(3) Have the basic ability and skill in C++ basic programming;
(4) Know about the background of software programming and software engineering.


Classroom and Laboratory

(1) Every Friday in Week 1-12, 14-19: Lecture hour 3-4, Classroom X12-S305
(2) Every Wednesday in Week 3,5,7,9,11,14,16 and 18: Lecture hour 9-12, Laboratory N1-Middle201
(3) Final Examinations: Programming Test in Week 18, Paper Test in Week 21


Syllabus

Type: L=Lecture, E=Experiment, Course Policy (作业与实验要求)
Records: Experiment Records(实验记录); Optional Assignment (选做题提交情况)

Week

Type

Date

Topic

Materials

1

L01

02-17

Introduction


Chapter1. Introduction to Computers, Internet and WWW

Comments on this chapter (学习说明)
Homework: 1.2, 1.3, 1.7, 1.10
Optional Assignment 1: Matrix (deadline Friday week12)
 

2

L02

02-24

Basic Programming I


Chapter2. Introduction to C++ Programming

Comments on this chapter (学习说明)
Source codes in this chapter
Homework: 2.1, 2.8, 2.10, 2.12, 2.15
 

3

E01

02-29

Basic Programming(任务)
Summary(实验总结)
Evaluation(报告评价)


Experiment Report Template

Experiment Tasks:
(1) Learn to use VC6 compile and run, fig02_01.cpp
(2) Learn to use VC6 debug, fig02_05.cpp
(3) Do exercises 2.19, 2.23
 

L03

03-02

Basic Programming II


Homework: 2.28, 2.29, 3.4, 3.5
 

4

L04

03-09

Basic Classes


Chapter3. Introduction to Classes and Objects

Comments on this chapter (学习说明)
Source codes in this chapter
Homework: 3.1, 3.6, 3.8, 3.10
Optional Assignment 2: 12.10 (deadline Friday week12)
 

5

E02

03-14

Basic Classes(任务)
Summary(实验总结)


Sample codes for function and class programming

(关于函数和类的补充示例代码)
Experiment Tasks:
(1) Do exercises of chapter2 : 2.27, 2.28, 2.29
(2) Do exercises of chapter3 : 3.11, 3.12, 3.15
 

L05

03-16

Control Statements_I


Chapter4. Control Statements: Part 1

Comments on these two chapters (学习说明)
Source codes in this chapter
Homework: 4.23, 4.24, 4.33
L05_Supplement homework
 

6

L06

03-23

Control Statements_II


Chapter5. Control Statements: Part 2

Source codes in this chapter
Sample codes for control statements
(关于控制语句的补充示例代码)
Sample codes for datatype and expression
(关于数据类型和表达式的补充示例代码)
Homework: 4.18, 4.21, 5.4, 5.7, 5.17
L06_Supplement homework
 

7

E03

03-28

Control Statements(任务)
Summary(实验总结)


Experiment Tasks:
(1) Do exercises of chapter4 : 4.14, 4.27
(2) Do exercises of chapter5 : 5.21, 5.29
 

L07

03-30

Control_Statements_III


Homework: 5.25, 5.27
L07_Supplement homework
 

8

L08

04-06

Functions_I


Chapter6. Functions

Comments on this chapter (学习说明)
Source codes in this chapter
Sample codes for storage class and scope
(关于作用域和存储类别的补充示例代码)
Homework: 6.16, 6.40, 6.49, 6.53 (5th Ed.) or 6.16, 6.36, 6.44, 6.48 (7th Ed.)
L08_Supplement homework
 

9

E04

04-11

Functions(任务)
Summary(实验总结)


Experiment Tasks:
Do exercises of chapter6:
(1) Time Distance, 6.26 (5th Ed.) or 6.25 (7th Ed.)
(2) Fibonacci Series, 6.41 (5th Ed.) or 6.37 (7th Ed.)
(3) Guess the Number, 6.54 (5th Ed.) or 6.49 (7th Ed.)
(4) Template of Maximum, 6.59 (5th Ed.) or 6.54 (7th Ed.)

 

L09

04-13

Function_II
Arrays_I


Chapter7. Arrays and Vectors

Comments on this chapter (学习说明)
Source codes in this chapter
Sample codes for advanced topics on functions
(函数默认实参、函数重载、函数模板的补充示例代码)
Sample codes for objects array
(关于对象数组的补充示例代码)
Homework: 6.45, 6.56, 7.8, 7.9 (5th Ed.) or 6.41, 6.51, 7.8, 7.9 (7th Ed.)
L09-10_Supplement homework

10

L10

04-20

Arrays_II


Sample codes for array sorting

(关于数组排序的补充示例代码)
Homework: 7.14, 7.18, 7.21 (7th Ed.)
 

11

E05

04-25

Arrays(任务)


Experiment Tasks:
Do exercises of chapter7:
(1) Bubble Sort, 7.11
(2) Selection Sort, 7.31
(3) Minimum in a vector, 7.40
L09-10_Supplement homework
 

L11

04-27

Pointers_I


Chapter8. Pointers

Comments on this chapter
Source codes in this chapter
Sample codes for variable address and const pointer
(关于变量地址和常量指针的补充示例代码)
Homework: 8.10, 8.11(5th Ed.) or 8.9, 8.10 (7th Ed.)
L11_Supplement homework
 

12

L12

05-04

Pointers_II


Sample codes for array address and pointer offset
(关于数组、指针以及指针偏移量的补充示例代码)
Homework: 8.9 (5th Ed.) or 8.8 (7th Ed.) , 8.11 (7th Ed.)
L12_Supplement homework
 

13

Middle Examination Week

14

E06

05-16

Pointers(任务)


Experiment Tasks:
Do exercises of chapter7:
(1) Quick Sort, 8.24(5th Ed.) or 8.15 (7th Ed.)
L11-12_Supplement homework
 

L13

05-18

Pointers_III
Advanced Classes I


Chapter9. Classes: Part 1

Source codes in this chapter
Homework: 9.5 Complex Class

15

L14

05-25

Advanced Classes II


Chapter10. Classes: Part 2
Source codes in this chapter
Homework: Time Class 10.10(5th Ed.) or 10.09 (7th Ed.)
 

16

E07

05-30

Advanced Classes(任务)

Experiment Tasks:
Do exercises of chapter7:
(1) Time Class, 10.10 (5th Ed.) or 10.09 (7th Ed.)
(2) Complex Class, 11.13 (5th Ed.) or 11.08 (7th Ed.)

L15

06-01

Operator overloading

Chapter11. Operator overloading
Source codes in this chapter
Sample codes for operator overload in Complex
(关于复数运算的运算符重载的补充示例代码)
Homework: Complex Class 11.13( 5th Ed.) or 11.08(7th Ed.)

17

L16

06-08

Inheritance

Chapter12. Object-oriented Programming: Inheritance
Source codes in this chapter  
Sample codes for student/graduate class
(关于继承的学生、研究生类的补充示例代码)

18

E08

06-13

Object-oriented Programming (任务)

Experiment Tasks:
Do exercises of chapter7:
(1) 12.10 Account (7th Ed.)
(2) 13.16 Account (7th Ed.)

L17

06-15

Polymorphism

Chapter13. Object-oriented Programming: Polymorphism
Source codes in this chapter
Sample codes for student/graduate class
(关于继承的学生、研究生类的补充示例代码)

Course Summary

19

National Holiday

20

Lecture Over

21

 

 

Paper Test

06 July, Morning Exam Time, Dong12-J2102

 

Reference Textbooks

[1] H.M.Deitel, P.J.Deitel, Small C++ How to program, 5th ,Pearson 2005
[2] H.M.Deitel, P.J.Deitel, C++ How to program  [digital version download], 5th ,Pearson 2005
[3] 谭浩强,《C++程序设计》,清华教育出版社,2004.6
[4] 郑莉 等,《C++ 语言程序设计》,清华大学出版社,2005.7
[5] 钱能 等,《C++ 程序设计教程》(第2版),清华大学出版社,2005.9

 

Resources

(1) Textbook[1] source code [download]
(2) Reference book for standard C/C++ functions [download]
(3) Development tool: Virsual C++ 6.0 for teaching and study [download]
(4) Development tool: Virsual C++ Assistant [download]
(5) Development tool: Code Blocks [download] and in Chinese language patch [download]

Feedback

If you have questions, welcome write e-mail to liuwei@hust.edu.cn.
Due to the large number of spam e-mails, please add ``[C++][Question]'' as the prefix in the title of your e-mail.
That will help me to identify your e-mails, thank you.


<Last Updated: 2012-06-15>