C++ Programming  (2012 Spring Medicine 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) Know about the background of software programming and software engineering.


Classroom and Laboratory

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


Syllabus

Type: L=Lecture, E=Experiment, Course Policy (课程要求)
Records: Lab Record (同济1101, 同济1102, 同济1103, 同济1104), 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-27

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, 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.8, 3,10
Optional Assignment 2: 12.10 (deadline Friday week12)
 

5

E02

03-12

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


Sample codes for function and class programming

(关于函数和类的补充示例代码)
Experiments Tasks:
(1) Do exercises of chapter2: 2.28, 2.29
(2) Do exercises of chapter3: 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.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, 5.4, 5.17
L06_Supplement homework (补充作业)
 

7

E03

03-28

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


Experiment Tasks:
(1) Do exercises of chapter4 : 4.14
(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-09

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.)

 

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
(函数默认实参、函数重载、函数模板的补充示例代码)
Homework: 6.45, 6.56, 7.8, 7.9 (7th Ed.) or 6.41, 6.51, 7.8, 7.9 (7th Ed.)
 

10

L10

04-20

Arrays_II


Sample codes for array sorting

(一维数组排序的补充示例代码)
Homework: 7.14
L10_Supplement homework
 

11

E05

04-23

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


Experiment Tasks:
Do exercises of chapter7:
(1) Bubble Sort, 7.11
(2) L05_Supplement homework (补充作业) or
L06_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.)
 

12

L12

05-04

Pointers_II


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

13

Middle Examination Week

14

E06

05-14

Pointers(任务)

Experiment Tasks:
Do exercises of chapter7:
(1) Quick Sort, 8.15
(2) L07_Supplement homework (补充作业) or
L08_Supplement homework (补充作业)

L13

05-18

Pointers_III
Advanced Classes_I

Chapter9. Classes: Part 1
Source codes in this chapter
Homework: 9.5 Complex Class(7th Ed.)

15

L14

05-25

Advanced Classes_II

Chapter10. Classes: Part 2
Source codes in this chapter

16

E07

05-28

Advanced Classes

Do exercises (optional) :
(1) L10_Supplement homework

L15

06-01

Operator overloading

Chapter11. Operator overloading
Source codes in this chapter
Homework: 11.8 Complex Class(7th Ed.)

17

L16

06-08

Object-oriented Programming

Chapter12. Object-oriented Programming: Inheritance
Source codes in this chapter

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

18

E08

06-11

Advanced Classes

Checking List

Experiment Tasks:
Do exercises (optional) :
(1) Complex Class, 11.13 (5th Ed.) or 11.08 (7th Ed.)

L17

06-15

Course Summary



19

National Holiday

20

Lecture Over

21

 

 

Paper Test


同济1101, 06 July, Morning, X12-N201
同济1102, 06 July, Morning, X12-N201
同济1103, 06 July, Morning, X12-N202
同济1104, 06 July, Morning, X12-N203

 

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>