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 |
---|---|---|
Jan 20 |
Course introduction and syllabus overview.
|
- Syllabus - Class notes 1 [pdf] - Ch. 1 of [S] |
Jan 22 |
Decomposition of Complex systems.
The role of design in software development
|
- Class notes 1 [pdf] - Intro notes on Scala [pdf] - Ch. 1 of [S] |
Jan 27 | First step in Scala. Basic types and implicit conversions. Tuple types. Mutable and immutable variables. Expressions with side effect. Control structures: if expressions and and sequential composition. Blocks. Methods. Unit returning methods. |
- Ch. 2 of [S] - Scala examples 1 |
Jan 29 | More on Scala's main constructs. Control structures: while. Recursive methods. Nesting and variable scoping. Patterns and pattern matching. Immutable lists. List construction and pattern matching over lists. |
- Ch. 3 of [S] - Scala examples 2 - Scala examples 3 - Homework 1 out (on ICON) |
Feb 3 |
Arrays in Scala.
More Scala control structures: for.
Iterating over collections.
|
- Class notes 2 [pdf] - Ch. 7 of [S] - Scala examples 4 |
Feb 5 |
The Object Model of development.
Examples of abstraction, encapsulation and contracts.
Classes and class hierarchies.
Subclassing and inheritance.
Single and multiple inheritance.
|
- Class notes 2 [pdf] - Ch. 4 of [S] - Scala examples 5 - Homework 1 due (on Friday, on ICON) |
Feb 10 | Designing class hierarchies in OO programming languages. Subclassing and inheritance. Abstract and concrete classes. Factorization of methods and fields in superclasses. Examples in Scala. |
- Ch. 6,10 of [S] - Scala examples 6 |
Feb 12 |
Overriding of fields and methods in subclasses.
Static vs. dynamic type of an object.
Composition vs. inheritance.
Abstract fields and methods.
Motivation and uses.
|
- Class notes 3 [pdf] - Scala examples 7 - Homework 2 out on Friday |
Feb 17 |
Discussion of Homework 2 and parallels with Vector example studied in the lab.
|
- Ch. 19.1 of [S] - Scala examples 8 - Scala examples 9 |
Feb 19 |
More on generic classes in Scala. Examples.
|
- Ch. 8 of [S] - Scala examples 9 - Ch. 16 of [S], as needed - Scala examples 10 |
Feb 24 |
More on higher-order programming in Scala.
Examples. |
- Sec. 14.1-14.3 of [S] - Scala examples 10 (revised) - Scala examples 11 |
Feb 26 |
More on contracts and their use.
Practice with specifying contracts with require, assert and ensure.
Sorted queue example.
|
- Scala examples 11 - Homework 3 out on Friday |
Mar 3 |
Discussion of Homework 2 grades and solution. |
- ScalaCheck package - ScalaCheck user guide - Scala examples 12 |
Mar 5 | 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 |
Mar 10 |
Modules and modularity.
Module decomposition vs class decomposition.
|
- Ch. 4, 13, 29 of [S] - Scala examples 14 (see also here) - demo program |
Mar 12 | Midterm | See Exams section |
Mar 17 | Spring break |
|
Mar 19 | Spring break |
|
Mar 24 |
Discussion of midterm grading and solutions.
|
- Ch. 1, 2 of [T] - Class notes on Ch. 1 [pdf] |
Mar 26 |
Concurrent programming. The actor model. |
- Notes by A. Manivannan [web] - Notes by D. Westheide [web] - Scala examples 15 |
Mar 31 |
Iterative development and its benefits.
Pitfalls of the waterfall life cycle.
The Unified Process and its main phases. |
- Ch. 2, 3, 4 of [T] - Class notes on Ch. 2 [pdf] - Class notes on Ch. 4 [pdf] |
Apr 2 |
Requirements and requirement elicitation.
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.
Example.
Granularity tests. |
- Ch. 6 of [T] - Class notes on Ch. 5-6 [pdf] |
Apr 7 |
Transitioning from the Inception to the Elaboration stage in the UP.
Overview of the Elaboration stage. Planing the iterations. |
- Ch. 8 of [T] - Class notes on Ch. 8 [pdf] |
Apr 9 |
Domain models continued. Drawing the DM as simplified class diagrams.
Proper identification and style of concepts, attributes and associations.
|
- Ch. 9, 10 of [T] - Class notes on Ch. 9 [pdf] - Class notes on Ch. 10 [pdf] |
Apr 14 | Further defining the objects' behavior through Operation Contracts. Emphasis on postconditions. Transitioning from system modeling to design. Layered architectures and the Domain Layer. |
- Ch. 11-14 of [T] - Class notes on Ch. 11 [pdf] - Class notes on Ch. 12-14 [pdf] |
Apr 16 | Defining the objects: CRC cards and dynamic modeling. Introduction to UML interaction diagrams: sequence diagrams and communication diagrams. |
- Ch. 14, 15 of [T] - Class notes on Ch. 15 [pdf] - Sequence diagrams tutorial |
Apr 21 | Static object modeling. Design class diagrams. Group exercise on modeling an email client. |
- Ch. 16 of [T] |
Apr 23 | Group exercise: class diagram design for mail client application. Focus on subclass hierarchy, attributes and associations. Discussion. |
- Ch. 16 of [T] |
Apr 28 | Group exercise: sequence diagram design for mail client application. Using sequence diagrams to inform refinement of class diagrams with methods. Discussion. |
|
Apr 30 | The GRASP design methodology. Responsibilities-driven design and design patterns. Basic design patterns and motivation. Examples of object-oriented design with GRASP. |
- Class notes on Ch. 15 [pdf] - Ch. 17, 18 of [T] |
May 5 | Question and answer session on the course project. |
|
May 7 |
Verifying the correctness of Scala program with the Leon verifier.
|
- Leon website (recommended) |
May 15 | Final Exam | See Exams section |