Skip to main content

Imperative Programming II:  2016-2017

Lecturer

Degrees

Preliminary ExaminationsComputer Science and Philosophy

Preliminary ExaminationsComputer Science

Preliminary ExaminationsMathematics and Computer Science

Term

Overview

This course, given in the Scala programming language, introduces different techniques for the design, specification, and implementation of small to medium size programs within the Object-Oriented Programming (OOP) paradigm. The course only assumes familiarity with the essential concepts and constructs of imperative programming, such as conditionals, loops, etc., but it is self contained otherwise. After introducing Scala, the course focuses on three main topics: Abstract Data Types (ADTs), principles of OOP, and Design Patterns in the OOP framework.

Learning outcomes

After taking the course, participants will be able to

  • Specify simple abstract data types and design implementations using abstraction functions.
  • Use and recognise features of OOP design patterns and give examples of their use.
  • Develop Scala programs following both common design patterns and the priniciples of OOP.
  • Read and modify small to medium size Objected-Oriented programs within software designs.

Synopsis

OOP Programming in Scala

  • Lectures 01-04: Programming in Scala, Objects and classes; Concrete Data Structures, and overview of some OOP Scala features. 

Designing with ADTs

  • Lectures 05-07: Specifying, Representing, and Implementing ADTs. 

Designing with Objects

  • Lectures 08-12: Object identity and encapsulation; Subclasses and inheritance; Abstraction and polymorphism; Implicits, Generics, Iterators, and Types. 

OOP Design Patterns

  • Lectures 13-16: Design patterns in OOP; Creational, Structural, and Behavioural design patterns. 

Practical sessions: The course is complemented with four practical sessions, using the Scala language.

Syllabus

  • Lectures 01-04: In these lectures the students will learn how to write programs, using objects and classes in the Scala programming language. The students will learn about the following programming language constructs of Scala: conditionals, loops, types, functions, I/O libraries, etc. They also learn how to use the read-eval-loop mode of Scala. They will also learn about objects and classes and how some Concrete Data Structures are used and implemented in Scala. For instance, the students will learn how to use arrays, lists, and other useful concrete data structures already available in the standard distribution of Scala. The students will also learn about Scala features that will be used to implement OOP features; for instance, abstract classes, traits, parametric methods, subclasses, etc. With respect to the use of classes, the students will learn concepts such as linearisation and dynamic binding in Scala. 

 

  • Lectures 05-07: In these lectures the students will learn about programming with Abstract Data Types (ADTs). We will cover the basic concepts of ADTs and how they can be used as the basis for the modular development of very general computer programs. We will also study how to specify ADTs using a pre/post-conditions notation, and how to go from an ADT specification to an actual (Scala) program. We will study a number of important ADTs and how to how to systematically produce a simple concrete data structure from a given ADT specification as well as how to relate the two in a formal way.

 

  • Lectures 08-12: In these lectures the students are fully introduced to the basic concepts behind OOP. They also learn about the main differences between OOP and other paradigms and see some examples. In particular, the students will study in detail fundamental concepts of OOP such as object identity and encapsulation; subclasses and inheritance; and abstraction and polymorphism. We will also study some advanced features of Scala which are quite useful when writing OOP programs in Scala: Implicits; Iterators; Covariant, Contravariant, and Invariant Types; and Generic methods. 

 

  • Lectures 13-16: In these lectures the students will learn about OOP design patterns. We will study the main concepts, importance, and usage of design patterns for the construction of good software designs, in particular within the OOP framework. We will cover a wide range of design patterns, and study in detail some widely used Creational, Structural, and Behavioural design patterns. 

Reading list

References: We will not follow a single book in this course. However, there are a few references that can be used as a general guideline for each week/topic of the course.

  1. Programming in Scala. Martin Odersky, Lex Spoon, Bill Venners. Artima. A standard guide for Scala programmers.
  2. Abstract Data Types: Speci_cations, Implementations, and Applications. Nell Dale and Henry M. Walker. Jones & Bartlett Learning. A good reference on abstract data types with concrete implementations.
  3. An Introduction to Object-Oriented Programming. Timothy Budd. Addison-Wesley. This book aims to present the principles of OOP in a language-independent way.
  4. Design Patterns: Elements of Reusable Object-Oriented Software. Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Addison-Wesley. A comprehensive reference on design patterns for Object-Oriented software design.

Feedback

Students are formally asked for feedback at the end of the course. Students can also submit feedback at any point here. Feedback received here will go to the Head of Academic Administration, and will be dealt with confidentially when being passed on further. All feedback is welcome.

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.