IN3013/INM173: Object Oriented Programming in C++

Lecturer

Ross Paterson.

Classes

Lecture
Tuesday, 11-1 in U215.
Labs (U/G)
Tuesday, 10-11 in A412 and 2-3 in A412/413.
Lab (P/G)
Tuesday, 10-11 in A413.

New: past exams

Past exams for 2001 and 2003 are online. These are 3-question exams for an MSc module. Note that this year:

Aims

Assuming a basic understanding of object-oriented programming techniques and the Java language, this module will explore object-oriented programming techniques in greater depth. The module will focus on practical applications, using the C++ language, which is widely used in industry.

Learning Objectives

On successful completion of this course, students should be able to:

Course Outline

  1. Introduction to C++ for Java programmers. Parameter passing by value and reference [Savitch 4; Stroustrup 5.5; Horstmann 5.7-8]. [lecture slides and exercises]
  2. Classes in C++ [Savitch 6.2, 7.1; Stroustrup 10.1-2.2,10.3.1; Horstmann 8]. [lecture slides, exercises and first coursework]
  3. Operator overloading [Savitch 8.1; Stroustrup 7.4,11; Horstmann 13.4].
    More on I/O in C++ [Savitch 8.3; Stroustrup 21; Horstmann 10.1]. [lecture slides and exercises]
  4. Genericity (or parametric polymorphism). C++ templates [Savitch 16.1-2; Stroustrup 13.2-3; Horstmann 13.5].
    Introducing the standard template library (STL) [Savitch 19.1; Stroustrup 16.2.3,16.3; Horstmann 13.5]. [lecture slides, exercises and second coursework]
  5. Pointers and arrays [Savitch 10.1; Stroustrup 5.1-3; Horstmann 9.7].
    Iterators in the STL [Savitch 17.3,19.2; Stroustrup 19.2]. [lecture slides and exercises]
  6. reading week (no lecture)

  7. Inheritance and dynamic binding in C++ [Savitch 14,15; Stroustrup 12; Horstmann 14].
    Genericity, pointers and inheritance [Savitch 16.3; Stroustrup 12]. [lecture slides, exercises and third coursework]
  8. Multiple inheritance [Stroustrup 15.2]. [lecture slides and exercises]
  9. Memory management: static, stack, dynamic. Construction and destruction of objects [Savitch 10.3; Stroustrup 10.4; Horstmann 13.2]. [lecture slides and exercises]
  10. Memory management, continued. Implementing a container class. Program structure, separate compilation, header files [Savitch 11.1; Stroustrup 9]. [lecture slides, Vector.cc and exercises]
  11. Resource management and exceptions [Savitch 18; Stroustrup 14]. [lecture slides and exercises]

Assessment

In addition to the examination (worth 70%), there will be three practical courseworks:

  1. (8%) distributed in week 2, due in week 4.
  2. (10%) distributed in week 4, due in week 7.
  3. (12%) distributed in week 7, due in week 9.
Courseworks will be distributed on Tuesdays and are due on Tuesdays.

Past exams for 2001 and 2003 are online. These are 3-question exams for an MSc module. Note that this year:

Materials Provided

Copies of lecture slides and weekly lab exercises (in addition to assessed assignments).

Course Text

Walter Savitch, Absolute C++, Addison-Wesley Longman, Reading, Mass, 2002.

Background reading

Web Materials



Ross Paterson 2004-04-05