Ross Paterson.
- 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.
Past exams for 2001
and
2003
are online.
These are 3-question exams for an MSc module.
Note that this year:
- MSc students have a 1.5 hour exam, and answer 2 questions out of 3.
- undergraduate students have a 2 hour exam, and answer 3 questions out of 4.
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.
On successful completion of this course, students should be able to:
- read and modify substantial well-written C++ programs.
- create classes and small programs in C++
that are correct, robust and
capable of being understood, reused and modified by others.
- make use of various object-oriented features,
including inheritance, multiple inheritance and genericity,
to enhance the above qualities.
- 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]
- Classes in C++
[Savitch 6.2, 7.1; Stroustrup 10.1-2.2,10.3.1; Horstmann 8].
[lecture slides,
exercises
and
first coursework]
- 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]
- 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]
- 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]
- reading week (no lecture)
- 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]
- Multiple inheritance
[Stroustrup 15.2].
[lecture slides
and
exercises]
- Memory management: static, stack, dynamic.
Construction and destruction of objects
[Savitch 10.3; Stroustrup 10.4; Horstmann 13.2].
[lecture slides
and
exercises]
- Memory management, continued.
Implementing a container class.
Program structure, separate compilation, header files
[Savitch 11.1; Stroustrup 9].
[lecture slides,
Vector.cc
and
exercises]
- Resource management and exceptions
[Savitch 18; Stroustrup 14].
[lecture slides
and
exercises]
In addition to the examination (worth 70%),
there will be three practical courseworks:
- (8%) distributed in week 2, due in week 4.
- (10%) distributed in week 4, due in week 7.
- (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:
- MSc students have a 1.5 hour exam, and answer 2 questions out of 3.
- undergraduate students have a 2 hour exam, and answer 3 questions out of 4.
Copies of lecture slides and weekly lab exercises
(in addition to assessed assignments).
Walter Savitch,
Absolute C++,
Addison-Wesley Longman, Reading, Mass, 2002.
- Bjarne Stroustrup,
The C++ Programming Language,
3rd edition, Addison-Wesley Longman, Reading, Mass, 1997.
- Cay Horstmann,
Computing Concepts with C++ Essentials,
2nd edition, Wiley, 1999.
- Bertrand Meyer, Object-Oriented Software Construction,
2nd edition, Prentice Hall, 1997.
Ross Paterson
2004-04-05