Lectures
This page summarizes the content of past lectures and provides lecture notes and exercises.
Note: In the readings below, "[T]" refers to the textbook and "[S]" to the recommended Scala book.
(Jump to most recent class)
Date | Topic | Readings |
---|---|---|
Aug 27 |
Course introduction and syllabus overview.
|
- Syllabus - Class notes 1 [pdf] - Ch. 1 of [S] |
Aug 29 |
Decomposition of Complex systems.
The role of design in software development
|
- Ch. 1, 2 of [S] - Intro notes on Scala [pdf] - Scala examples 1 |
Sep 3 | More on Scala. Mutable and immutable variables. Expressions with side effect. Sequential composition. Blocks. Control structures: if and while. Methods. Unit returning methods. Recursive methods. Nesting and variable scoping. Patterns and pattern matching. |
- Ch. 2 of [S] - Scala examples 2 |
Sep 5 | More on pattern matching in Scala. Immutable lists. List construction and pattern matching. Recursive functions over lists. |
- Ch. 3 of [S] - Scala examples 3 - Homework 1 out (on ICON) |
Sep 10 |
The Object Model of development.
Origins and evolution.
Major features: abstraction and encapsulation.
Design by contract.
Examples of abstraction, encapsulation and contracts.
|
- Class notes 2 [pdf] - Ch. 7 of [S] - Scala examples 4 |
Sep 12 |
The Object Model of development.
Classes and class hierarchies.
Subclassing and inheritance.
Single and multiple inheritance.
Types and type systems.
|
- Class notes 2 - Ch. 4 of [S] - Scala examples 5 - Homework 1 due (on ICON) |
Sep 17 | Designing class hierarchies in OO programming languages. Subclassing and inheritance. Abstract and concrete classes. Factorization of methods and fields in superclasses. Overriding of fields and methods in subclasses. Static vs. dynamic type of an object. Composition vs. inheritance. Examples in Scala. |
- Ch. 6,10 of [S] - Scala examples 6 - Scala examples 7 |
Sep 19 |
Abstract fields and methods.
Motivation and uses.
|
- Class notes 3 [pdf]
- Homework 2 out |
Sep 24 |
Discussion of Homework 1 grades.
Note on the Scala Option type (to be used in Homework 2).
|
- Ch. 19.1-2 of [S] - Scala examples 9 |
Sep 26 |
More on generic classes in Scala. Examples.
|
- Ch. 8 of [S] - Scala examples 9 - Ch. 16 of [S], as needed - Scala examples 10 - Homework 2 due |
Oct 1 | Runtime assertions in Scala. Using assertion to in support of the Design-by-contract methodology. the require, assert and ensures constructs. Examples and exercises. Pros and cons. |
- Sec. 14.1-14.3 of [S] - Scala examples 11 - Homework 3 out |
Oct 3 |
Discussion of Homework 2 grades.
|
- Scala examples 11 |
Oct 8 |
Using Scalacheck for Scala unit testing.
Expressing method specifications as scalacheck properties.
Examples and exercises.
|
- scalacheck package - scalacheck user guide - Scala examples 12 - Homework 3 due |
Oct 10 | Single vs. multiple inheritance. OO modeling exercise: the animal domain. Achieving multiple inheritance in OO languages. Scala traits. Uses and examples. |
- Ch. 12 of [S] - Scala examples 13 |
Oct 15 | Midterm |
See Exams section |
Oct 17 |
Modules and modularity.
Module decomposition vs class decomposition.
|
- Ch. 13, 29 of [S] - Scala examples 14 (see also here) - demo program |
Oct 22 |
Discussion of midterm grading and solutions. |
- Ch. 1, 2 of [T] - Class notes on Ch. 1 [pdf] - Homework 4 out |
Oct 24 |
The benefits of iterative development.
Pitfalls of the waterfall life cycle.
Main phases of the UP. |
- Ch. 2, 3, 4 of [T] - Class notes on Ch. 2 [pdf] - Class notes on Ch. 4 [pdf] |
Oct 29 | Requirements and requirement elicitation. The evolutionary nature of requirements. Main types of requirements and related artifacts. Use cases. Actors and scenarios. Types of actors. Levels of detail in use cases. Main and alternative scenarios. Examples. |
- Ch. 6 of [T] - Class notes on Ch. 5-6 [pdf] |
Oct 31 |
More on use cases.
Guidelines for writing good use cases.
Examples.
Granularity tests. |
- Ch. 6 of [T] |
Nov 5 |
Domain modeling using UML class diagrams.
Associations vs. attributes.
Examples.
Cardinality constraints in associations.
Special associations: generalization and aggregation.
Examples. |
- Ch. 8, 9 of [T] |
Nov 7 |
More on class diagrams. Examples. |
- Ch. 9 of [T] |
Nov 12 |
System sequence diagrams. Motivation and examples.
Group exercise.
Operation contracts as a complement and extension to use cases. Preconditions and postconditions. Examples. |
- Ch. 10, 11 of [T] |
Nov 14 | Objected Oriented Design. UML Interaction Diagrams. Sequence diagrams. Examples and group exercise. |
- Ch. 14, 15 of [T] - Sequence diagrams tutorial |
Nov 19 |
Follow-up group exercise on sequence diagrams.
Design class diagrams. Uses and examples. |
- Ch. 16 of [T] |
Nov 21 | The GRASP design methodology. Assigning responsibilities to software classes. Design patterns. Basic patterns and motivation. |
- Ch. 17 of [T] |
Nov 26 | Thanksgiving break |
|
Nov 28 | Thanksgiving break |
|
Dec 3 | Examples of object-oriented design with GRASP. Use case realizations for POS system. |
- Ch. 18 of [T] |
Dec 5 |
Concurrent programming. The actor model. |
- Ch. 32 of [S] - Class notes by T. Dsilva [pdf] - Scala examples 15 |
Dec 10 |
Verifying the correctness of Scala program with the Leon verifier.
|
- Leon website (recommended) |
Dec 12 | Question and answers session on the course project. |
|