University of Oxford Logo University of OxfordDepartment of Computer Science - Home

Imperative Programming II:  2012-2013

Information

Lecturer

Degrees

Preliminary ExaminationsComputer Science and Philosophy

Preliminary ExaminationsComputer Science

Preliminary ExaminationsMathematics and Computer Science

Term

Overview

This course starts with an introduction to the basic concepts and techniques of modular program construction and Object-Oriented Programming (OOP). It continues with one modest-sized case-study that introduces some of the basic OOP programming idioms (Design Patterns) in realistic settings.

There are three main ideas: encapsulation, that programs should be built from objects that satisfy a coherent specification and hide the details of how that specification is implemented; object identity, that each object has a distinct identity, so that multiple objects can co-exist and interact with each other; and polymorphism, that objects that implement the same interface can be used interchangeably to give a variety of behaviours.

There is a correspondingly heavy use of practicals to develop understanding of OOP in general, and the use of Scala in particular.

Learning outcomes

After studying this course, undergraduates will be able to:

Synopsis

1: Objects, Classes and Inheritance (Lectures 1 - 6)

2: Polymorphism and Advanced Types (Lectures 7 - 10)

3: Collections (Lectures 11 - 16)

Syllabus

Language features for structuring classes in Object-Oriented Programming: inheritance, abstract class, dynamic binding, and mix-ins (traits in Scala). Three kinds of polymorphism in OOP: subtyping polymorphism, overloading, and generics. Basic design patterns. Case studies: circuit simulation and collection framework with associated iterators.

Reading list

We recommend the following book:

This book, the lecture slides and occasional references from the slides will form good reading materials for this course.

If students want to go deep into the materials covered, they will find the following books useful:

The first book was the recommended text of this course before the 2012/2013 academic year. Although the course was changed, Chapters 1-10 of the book are still relevant to the lectures. The second book is a well-known reference on design patterns, which all OOP developers should know eventually. The last has a good description of language features of Java. Scala is often used together with Java, so this book will be useful when students build or modify real-world Scala programs.