COMP 151 Object-Oriented Programming [3-0-2:3]
2004 Fall Term
Lecture, MWF 12:00-12:50, Rm 4333
Dr. Dekai WU, Rm 3539, 2358-6989, dekai@cs.ust.hk
Wilbur WONG, Lab 1A, Tu 09:00-10:50, Rm 4214, cswilbur@cs.ust.hk
Yihai SHEN, Lab 1B, Th 11:00-12:50, Rm 4214, shenyh@cs.ust.hk
Announcements<- Important

Always check http://www.cs.ust.hk/~dekai/151/ for up-to-the-minute announcements.
Lab info is at http://course.cs.ust.hk/comp151/labs/.
Newsgroup is hkust.cs.class.151. Always read before asking/posting/emailing your question.

2004.12.06 The deadline for ASSIGNMENT 3 has been extended to 11:59pm instead of noon (still on Dec 8, 2004)

2004.11.22 ASSIGNMENT 3 will be due Dec 8, 2004 - Please review the PLAGIARISM and COLLABORATION policy below CAREFULLY

2004.11.18 ASSIGNMENT 2 deadline has been extended to 12:00 noon on Nov 22, 2004 due to numerous requests - Please review the PLAGIARISM and COLLABORATION policy below CAREFULLY

2004.11.05 ASSIGNMENT 2 will be due Nov 19, 2004 - Please review the PLAGIARISM and COLLABORATION policy below CAREFULLY

2004.11.01: Reminder - Assignment 1 will be collected at midnight today.

2004.10.19: Slides for lecture 11 (Inheritance: Introduction) have been fixed and updated.

2004.10.18: Assignment 1 will be due Nov 1, 2004 - Please review the PLAGIARISM and COLLABORATION policy below CAREFULLY

2004.10.18: Sample Exam is available for your practice - Good luck on the midterm!

2004.09.08: Slides for lecture 1 have been fixed and updated.

Policies

ACADEMIC CALENDAR DESCRIPTION

Object-oriented programming concepts and techniques. Software reuse. Classes, objects, and methods. Abstract data types. Object creation and initialization. Message passing. Class hierarchies and inheritance. Polymorphism. Templates and algorithm abstraction. Exclusion: COMP 251 (prior to 1999-2000) Prerequisite: COMP 103 or COMP 104

TEXTBOOKS

  1. Thinking in C++, Volume One: Introduction to Standard C++ (2nd Edition), by Bruce ECKEL. Prentice-Hall, 2000. ISBN: 0-13-979809-9.
  2. Thinking in C++, Volume Two: Practical Programming, by Bruce ECKEL and Chuck ALLISON. Prentice-Hall, 2004. ISBN: 0-13-035313-2.
Full text and code for both books are available online at no cost at http://www.BruceEckel.com.
An official Hong Kong mirror site for fast downloading is at http://www.cs.ust.hk/~dekai/library/ECKEL_Bruce/.

REFERENCE BOOKS

  1. The C++ Programming Language (3rd Edition), by Bjarne STROUSTRUP. Addison-Wesley, 1997. ISBN: 0-201-88954-4. This classic reference (by the designer of C++) is a must-have for every serious C++ programmer, covering details often omitted in textbooks.
  2. C++ Primer (3rd Edition), by Stanley B. LIPPMAN and Josee LaJOIE. Addison-Wesley, 1998. ISBN: 0-201-82470-1. This traditional text can be used as a first book for learning C++ but assumes that the reader is familiar with programming, and more insightful textbooks have now appeared since it was first written.
  3. Problem Solving with C++: The Object of Programming, Walter SAVITCH. Addison-Wesley, 1996. This book gives an introduction to C++ and introduces basic programming techniques.
  4. C++: Effective Object-Oriented Software Construction: Concepts, Principles, Industrial Strategies, and Practices, by Kayshav DATTATRI. Prentice Hall, 1997. ISBN: 0-13-104118-5. This book is good provided that you are fluent with C++ and it emphasizes more on the design, programming techniques, and why C++ is designed as it is now.

TAS

OFFICE HOURS

You are welcome to knock on the doors of the instructor any time. The TA's office hours are TBA.

REQUIRED SIGNATURE ON HONOR STATEMENT

To receive a passing grade, you are required to sign an honor statement acknowledging that you understand and will uphold all policies on plagiarism and collaboration.

PLAGIARISM

All materials submitted for grading must be your own work. You are advised against being involved in any form of copying (either copying other people's work or allowing others to copy yours). If you are found to be involved in an incident of plagiarism, you will receive a failing grade for the course and the incident will be reported for appropriate disciplinary actions.

COLLABORATION

You are encouraged to collaborate in study groups. However, you must write up solutions on your own. You must also acknowledge your collaborators in the write-up for each problem, whether or not they are classmates. Other cases will be dealt with as plagiarism.

EXAMINATIONS

No reading material is allowed during the examinations. No make-ups will be given unless prior approval is granted by the instructor, or you are in unfavorable medical condition with physician's documentation on the day of the examination. In addition, being absent at the final examination results in automatic failure of the course according to university regulations, unless prior approval is obtained from the department head.

There will be one midterm worth 250 points, and one final exam worth 350 points.

HOMEWORK

All programming assignments must be submitted at the beginning of lecture on the due date. Programming assignments must be in C++ on Unix and will be collected electronically using the automated ACS (assignment collection system). Late assignments cannot be accepted. Sorry, in the interest of fairness, exceptions cannot be made.

Programming assignments will account for a total of 250 points.

LABS

All information for laboratory assignments is at http://course.cs.ust.hk/comp151/labs/.

Laboratory assignments will be announced at the end of each week, and will be due on the following Friday at 23:00. Laboratory assignments must be in C++ on Unix and will be collected electronically using the automated ACS (assignment collection system). Late assignments cannot be accepted. Sorry, in the interest of fairness, exceptions cannot be made.

You will also have the option to turn in your laboratory assignments in lab by demonstrating to the TA. This will also give you an opportunity to get an early indication of whether your assignment is correct. If not, you may still decide to fix it, and then wait until the Friday 23:00 ACS collection to turn in your assignment.

There will be approximately 10 laboratory assignments, each accounting for 15 points, for a total of 150 points.

GRADE GUARANTEES

The total points you can achieve in the course is 1000.  The course will be graded on a curve, but subject to the following guarantees:
 
If you achieve 900 points you will receive no less than a A grade.
800 points B
700 points C
600 points D
Schedule Wk Event Paradigm Topic Notes Reading Assignments
2004.09.01 1 Lecture Administrivia (honor statement, HKUST classroom conduct)
2004.09.03 1 Lecture SwEngr Introduction: C++ and software engineering V1.Ch1
2004.09.06 2 Lecture SwEngr Introduction: C++ and software engineering (cont)
2004.09.08 2 Lecture SwEngr Introduction: C++ and software engineering (cont)
2004.09.10 2 Lecture SwEngr Introduction: Data abstraction V1.Ch2
2004.09.13 3 Lecture SwEngr Introduction: Data abstraction (cont)
2004.09.15 3 Lecture SwEngr Separate compilation V1.Ch3 (p202-210)
2004.09.17 3 Lecture SwEngr Separate compilation (cont) (CheckDate.cpp, Date.cpp, Date.h)
2004.09.20 4 Lecture Procedural Declaration and definition V1.Ch4
2004.09.22 4 Lecture Procedural Declaration and definition (cont) V1.Ch5
2004.09.24 4 Lecture Procedural Pointers V1.Ch3, ref V1.Ch13
2004.09.27 5 Lecture Procedural Pointers (cont)
2004.09.29 5 Holiday Autumn Moon Festival
2004.10.01 5 Holiday National Day
2004.10.04 6 Lecture Procedural Pointers (cont), allocating 2D arrays (4-up)
2004.10.06 6 Lecture Procedural References V1.Ch3
2004.10.08 6 Lecture Procedural Const, argc & argv V1.Ch8
2004.10.11 7 Lecture StaticOO Overloading and constructors V1.Ch6
2004.10.13 7 Lecture StaticOO Overloading and constructors (cont)
2004.10.15 7 Lecture StaticOO Destructors V1.Ch6
2004.10.18 8 Lecture StaticOO Order of construction/destruction, Post Office example V1.Ch6
2004.10.20 8 Lecture StaticOO Inheritance: Introduction V1.Ch14
2004.10.22 8 Lecture StaticOO Inheritance: Substitution principle V1.Ch14
2004.10.25 9 Exam Midterm (in class; sample exam for your practice)
2004.10.27 9 Lecture StaticOO Inheritance: Substitution principle (cont) V1.Ch14
2004.10.29 9 Lecture StaticOO Inheritance: Access control: public, protected, private V1.Ch14
2004.11.01 10 Lecture DynamicOO Inheritance: Virtual functions V1.Ch15 A1 due
2004.11.03 10 Lecture DynamicOO Inheritance: Overriding vs overloading V1.Ch15
2004.11.05 10 Lecture DynamicOO Inheritance: Abstract base classes, ex1, ex2, ex3, ex4 V1.Ch15
2004.11.08 11 Lecture Generic Introduction to generic programming V1.Ch16
2004.11.10 11 Lecture Generic Function and class templates V1.Ch16
2004.11.12 11 Lecture Generic Function and class templates (cont) V1.Ch16
2004.11.15 12 Lecture StaticOO Inheritance: Public, private, protected inheritance V1.Ch14
2004.11.17 12 Lecture Generic Overloading operators V1.Ch12
2004.11.19 12 Lecture Generic Overloading operators (cont) V1.Ch12 A2 due
2004.11.22 13 Lecture Generic Container classes V2.Ch7
2004.11.24 13 Lecture Generic Iterators V2.Ch6
2004.11.26 13 Lecture Generic Iterators (cont'd) V2.Ch6
2004.11.29 14 Lecture Generic STL: Introduction to algorithms V2.Ch6
2004.12.01 14 Lecture Generic STL: Function pointers V2.Ch6, ref V1.Ch3
2004.12.03 14 Lecture Generic STL: Function objects or functors V2.Ch6
2004.12.06 15 Lecture Generic STL: More algorithms V2.Ch6
2004.12.06 15 Makeup Procedural Namespaces (18:00-18:50, Room 2303, L17-18) V1.Ch10
2004.12.08 15 Lecture StaticOO The "this" pointer V1.Ch4 A3 due
2004.12.13 16 Exam Final (08:30-11:30, Room 3007)


dekai@cs.ust.hk
Last update: 2004.12.06