Course Material for 159-234 - OO Programming
This is a temporary set of material for paper 159.234 - more material
will appear here during the semester.
Lectures
Lectures for this paper are at 1pm on Tuesdays in QB5; at 1pm on
Thursdays in QB2; and at 9am on Fridays in QB5. Lectures start on the
hour and usually last 45 minutes. Lectures slides will generally be
posted on this web site after the lecture.
- Course outline (Word doc) for 159-234 (covered in lecture 1)
- C Summary (revision Material - lecture 2)
- C, pointers and Memory Allocation (Slides - lecture 2)
[PPT]
- C++ I/O (cin/cout etc) (Slides - lecture 3)
[PPT]
- C++ enum, const etc (Slides - lecture 4)
[PPT]
- Conditional operator, function overloading, reference parameters (Slides - lecture 5)
[PPT]
- Inline functions, expressions, break and continue (Slides - lecture 6)
[PPT]
- Static Keyword, scope, new/delete and namespace (Slides - lecture 7)
[PPT]
- Classes - Introduction and revision of struct (Slides - lecture 8)
[PPT]
- Classes, Object instances and class variables (Slides - lecture 9)
[PPT]
- this pointer, Constructors and initialisation lists (Slides - lecture 10)
[PPT]
- Destructors and Copy Constructors (Slides - lecture 11)
[PPT]
- friend functions and classes (Slides - lecture 12)
[PPT]
- Operator Overloading (Slides - lecture 13)
[PPT]
- Revision on "this" and Assignment Operator Overloading (Slides - lecture 14)
[PPT]
- Exceptions (Slides - lecture 15)
[PPT]
- Inheritance (Slides - lecture 16)
[PPT]
- Polymorphism (Slides - lecture 17)
[PPT]
- Abstract Classes (Slides - lecture 18)
[PPT]
- Multiple Inheritance (Slides - lecture 19)
[PPT]
- Strings (Slides - lecture 20)
[PPT]
- Inheritance Examples (Slides - lecture 21)
[PPT]
- Function Templates (Slides - lecture 22)
[PPT]
- STL Introduction (Slides - lecture 23)
[PPT]
- STL Algorithms (Slides - lecture 24)
[PPT]
- STL Containers Guided Tour (Slides - lecture 25)
[PPT], the STL codes discussed in this lecture are available as a
zip file.
- Type Conversion (Slides - lecture 26)
[PPT]
- Virtual Destructors and Obscure Keywords (Slides - lecture 27)
[PPT]
- Short Intro to Java parts 1 and 2 (Slides - lecture 28)
[PPT]
- Short Intro to Java parts 3 and 4 (Slides - lecture 29)
[PPT]
- Short Intro to Java part 5 (Slides - lecture 30)
[PPT]
- Short Intro to Java part 6 (Slides - lecture 31)
[PPT]
- Short Intro to Java part 7 (Slides - lecture 32)
[PPT]
- Short Intro to Java part 8 (Slides - lecture 33)
[PPT]
- Object Oriented Design (Slides - lecture 34)
[PPT]
- OO Design Patterns (Slides - lecture 35)
[PPT]
- 159.234 OO Programming Course Review (Slides - lecture 36)
[PPT]
The full text of (an earlier version) of the Short Java programming
course is available.
It is about 100 pages of text. The example programs are available as
a zip file.
A short note describing how to use the
command line interpreter and to set up your path and CLASSPATH to use
the java compiler and JVM is available. (Please report any mistakes
to me).
The Java API (application Programmer Interface) for Java Development
Kit 1.4 is available at the Sun Java web
site. (Click on API specifications on the left hand frame)
There is a useful FAQ list (a frequently asked questions list -
distilled from discussions amongst C++ programmers on the Internet.
It is at:
www.parashift.com/c++-faq-lite/.
Browsing it may help you think about some of the language features of
C++ and how you should choose between two or more different ways of
(apparently) doing the same thing in C++.
The Association for Computing Machinery (ACM) is a useful society to
join if you want to be connected into the community of professional
programmers and computer scientists. ACM has a web site at www.acm.org. The ACM has a student
magazine known as "Crossroads". A useful set of pages for this paper
are those on Object Oriented programming at:
www.acm.org/crossroads/doc/indices/objective-viewpoint.html.
Tutorials
Tutorials for this paper are at 3pm on Thursdays in AT7 and at 1pm on
Fridays in QB6. Tutorial questions will be made available here later
in the semester. You will find it helpful to go along to one of the
tutorials sessions each week. (You can attend both if you wish
although the material covered will be repeated.) You are most welcome
to ask the tutor questions during the sessions.
Assignments
There are five assignments set during the semester. The first one is
not assessed but by doing it you will find the first assessed
assignment easier. Assignments count for a total of 30% of your mark
for this paper. You should normally expect to spend around 8 - 12
hours working on each assignment.
Assignment 4 was issued at the Tuesday lecture on 11th May and is to be handed in by 12 noon on Tuesday 2nd June.
Assignment 3 was issued at the Tuesday lecture on 27th April and is to be handed in by 12 noon on Tuesday 11th May.
Assignment 2 was issued at the Tuesday lecture on 30th March and is to be handed in by 12 noon on Tuesday 20th April.
Assignment 1 was issued at the Tuesday lecture on 16th March and is
to be handed in by 12 noon on Tuesday 30th March.
Assignment 0 was issued at the Friday lecture on 27th February and is
to be handed in by 12 noon on Tuesday 9th March.
Other Material
There are a anumber of small programs that you can copy and use as
examples to get you started. They are available as zip files.
The Recommended textbook for this paper is C++ for C programmers, 3rd
Edition by Ira Pohl, and published by Addison Wesley. There is C++
source code from the book available on the Web at www.awl.com/cseng/titles/0-201-39519-3.
You may also find the following short notes useful for revision or to aid your understanding of C++ syntax.