Imperative Programming Part 3: 2021-2022
Lecturer | |
Degrees | Preliminary Examinations — Computer Science and Philosophy |
Term | Trinity Term 2022 (12 lectures) |
Overview
This course builds on the material taught in Imperative Programming Parts 1 and 2 and extends the principles of imperative programming developed there to the design and development of larger programs. It introduces the idea of object-oriented design and illustrates this idea with case studies.
This course aims to prepare undergraduates for the programming work they will undertake during their time in Oxford and subsequently, especially in the group project and later individual project work.
The course will introduce standard tools and techniques for software development: use of a version control system, an automated build process, an appropriate framework for automated unit and integration tests, and profiling tools for studying performance. Participants will be able to choose between an IDE and a traditional editor/compiler setup.
Learning outcomes
After taking the course, participants will be able to
- Explain standard features of object-oriented design
such as encapsulation, polymorphism, inheritance, and composition of
systems based on object identity.
- Use these features effectively to design and build
software.
- Describe some common object-oriented design patterns
and give examples of how they should be used.
- Design applications with an event-driven graphical user
interface.
Synopsis
· Objects: encapsulation; separation of concerns; loose coupling and high cohesion; object identity; object equality; sub-typing polymorphism.
· Inheritance: uses of inheritance; dynamic binding; overriding and overloading; problems with inheritance; inheritance versus composition.
· Design patterns; introduction to patterns; encapsulation; inheritance; exceptions; iteration; introduction to the text editor example.
· Model-view-controller and command patterns.
·
Implementing
undo; memento and decorator.
·
Testing
larger programs: unit testing; integration testing; regression testing; system
testing; metrics; test-driven development.
·
Iterator
and adapter.
·
Polymorphism:
type bounds; invariance, covariance and contravariance;
generic types and collections; Scala collections hierarchy.
· GUI programming: use of a GUI framework; the AutoSnail case study.
· Code organization and documentation: sources of problems; packages; version control systems; code clarity; documentation; comments.
·
Overview of the software development process.
Syllabus
Software architecture. Object-oriented design principles. Common design patterns. Event-driven programming. Case studies.
Reading list
There is no set text for the
course, in the sense of a book that is followed by the lectures.
The course will be taught
using the Scala programming language. As a guide to Scala, you might use
- Programming in Scala by Martin Odersky, Lex Spoon
and Bill Venners, published by Artima Inc
Optional
For reading around the course, I recommend a number of other books. A chatty and accessible introduction to design patterns that some will find enlightening and some will find infuriating is this book:
Head First Design Patterns by Eric Freeman and
Elisabeth Robson, published by O’Reilly.
The design patterns movement started with the following
book, and every serious
programmer should be aware of it. It is sometimes referred to as "The gang
of four book" (or GOF).
Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, published by Addison-Wesley.
The following is helpful as a principled account of design by contract, but it is based on the Eiffel language invented by the author rather than Scala.
Object-Oriented Software Construction, by Bertrand Meyer, published
by SAMS.
The following is a helpful book about restructuring programs to make them more clear, the program maintenance counterpart of modular design:
Martin Fowler, Refactoring: improving the design of
existing code, published by Addison-Wesley.
Taking our courses
This form is not to be used by students studying for a degree in the Department of Computer Science, or for Visiting Students who are registered for Computer Science courses
Other matriculated University of Oxford students who are interested in taking this, or other, courses in the Department of Computer Science, must complete this online form by 17.00 on Friday of 0th week of term in which the course is taught. Late requests, and requests sent by email, will not be considered. All requests must be approved by the relevant Computer Science departmental committee and can only be submitted using this form.