Class Schedule

Note: In the readings below, "[T]" refers to the textbook and "[S]" to the recommended Scala book.

Date Topic Readings
 
Aug 21

Course introduction and syllabus overview.

Introduction to Scala.

- Syllabus
- Ch. 1 of [S]
- Intro notes on Scala
Aug 23

The complexity of software systems. The challenges of software development. Features of good software systems.

The Scala interpreter. First examples of Scala expressions. Basic types and implicit conversions. Tuple types.

- Ch. 2 of [S]
- Class notes 1
- Scala examples 1
 
Aug 28

More on Scala expressions. Expressions with side effect. Sequential composition. Blocks. Control structures: if and while. Methods. Unit returning methods. Recursive methods. Nesting and variable scoping.

- Ch. 2 of [S]
- Scala examples 2
Aug 30

More on Scala methods and structured data types. Patterns and pattern matching. Arrays. Immutable lists. List construction and pattern matching. Recursive functions over lists.

- Ch. 3 of [S]
- Scala examples 3
 
Sep 4

The Object Model of development. Origins and evolution. Major features: abstraction and encapsulation. Design by contract.

More Scala control structures: for. Iterating over collections. Patterns and filters.

- Class notes 2
- Ch. 7 of [S]
- Scala examples 4
Sep 6

The Object Model of development. Examples of abstraction and encapsulation. Classes and class hierarchies. Subclassing and inheritance. Single and multiple inheritance.

More on Scala's for construct. Classes and objects in Scala. Class declarations and initialization. Fields and methods. Parameterless methods.

- Class notes 2
- Ch. 4 of [S]
- Scala examples 5
 
Sep 11

Encapsulation and information hiding in OO languages. Separating the interface from implementation. Examples in Scala.

- Ch. 6 of [S]
- Scala examples 5 (revised)
Sep 13

Discussion of Homework 1 grades.

Designing class hierarchies in OO programming languages. Abstract and concrete classes. Abstract fields and methods. Factorization of methods and fields in superclasses. Overriding of fields and methods in subclasses. Behavioral subtyping. Composition vs. inheritance. Examples in Scala.

- Ch. 10 of [S]
- Scala examples 6
- Scala examples 7
 
Sep 18

Defining features of objects: identity, state and behavior. Classes as contracts. Contract inheritance. Behavioral subtyping and the substitution principle. Examples.
Objects as computational machines.

- Class notes 3
- Scala examples 6 (updated)
Sep 20

OO modeling exercise: the animal domain. Single vs. multiple inheritance.
More on the substitution principle. Pitfalls with the is-a relation when modeling mutable objects. Examples with stretchable rectangles and square.
Discussion of Hw2 solutions.

 
 
Sep 24

Achieving multiple inheritance in OO languages. Scala traits. Uses and examples.
Parametric polymorphism as a complementary way to promote reuse. Generic methods and classes in Scala. Motivations and examples.

- Ch. 12 of [S]
- Ch. 19.1-2 of [S]
- Scala examples 8
- Scala examples 9
Sep 27

Functions and closures in Scala. Functions as values. Programming with higher-order methods. Capturing computational patterns with higher-order methods. Examples.
Discussion of Homework 2 grades.

- Ch. 8 of [S]
- Ch. 16 of [S],
  as needed
- Scala examples 10
 
Oct 2

No class

 
Oct 4

Midterm

See Exams section  
 
Oct 9

Modules and modularity. Module decomposition vs class decomposition.
Modularity in Scala: singleton classes (objects) and packages. Uses and examples.

- Chap. 13, 29 of [S]
- Class notes 2
- Scala examples 11
  (see also here)
- demo program
- Chap. 1 of [T]  
Oct 11

An iterative and evolutionary software development. The Unified Process. The benefits of iterative development. Pitfalls of the waterfall life cycle. Main phases of the UP.
Introduction to two main cases studies: POS systems and Monopoly game.

- Chap. 2, 3 of [T]  
 
Oct 16

Discussion of midterm grading and solutions.
The inception phase of the Unified Process. Main artifacts.
Requirements and requirement elicitation. The evolutionary nature of requirements. Main types of requirements and related artifacts.

- Chap. 4, 5 of [T]  
Oct 18

Use cases. Actors and scenarios. Types of actors. Levels of detail in use cases. Main and alternative scenarios. Examples.

- Chap. 6 of [T]  
 
Oct 23

More on use cases. Guidelines for writing good use cases. Examples. Granularity tests.
How to work with use cases.

- Chap. 6 of [T]
Oct 25

Runtime assertions in Scala. Using assertion to in support of the Design-by-contract methodology. Pros and cons. Limitations. Examples.

- Chap. 14 of [S]
- Scala examples 12
 
Oct 30

More on runtime assertions design by contract in Scala: the require, assert and ensures constructs. Examples and exercises.
Introduction to property-based testing with scalacheck.

- Chap. 14 of [S]
- Scala examples 12 (revised)
Nov 1

Motivation and advantages of property-based testing. Expressing method specifications as scalacheck properties. Examples and exercises.

- scalacheck user guide
- Scala examples 13
 
Nov 6

Domain modeling, motivation and uses. Expressing domain models with UML class diagrams.
Identifying classes and associations in OO domain design. University information system example.

- Chap. 8, 9 of [T]
Nov 8

More on domain modeling using UML class diagrams. Associations vs attributes. Examples. Cardinality constraints in associations. Special associations: generalization and aggregation. Examples.
System sequence diagrams. Motivation and examples.

- Chap. 9, 10 of [T]
 
Nov 13

Operation contracts as a complement and extension to use cases. Preconditions and postconditions.
Objected Oriented Design. UML Interaction Diagrams. Sequence diagrams. Examples.

- Chap. 11, 14, 15 of [T]
- Sequence diagrams tutorial
Nov 15

More on UML class diagram.
The GRASP design methodology. Assigning responsibilities to software classes. Design patterns. Basic patterns and motivation.

- Chap. 16, 17 of [T]
 
Nov 29

More on design patterns. Examples.
Anonymous classes and case classes in Scala. Examples.

- Chap. 17 of [T]
- Chap. 15 of [S]
- Scala examples 14
Nov 26

Examples of object-oriented design with GRASP. Use case realizations for POS system.

- Chap. 18 of [T]
 
Dec 4

More on case classes in Scala. Discussion of their use in Persistent Table module in the class project.
More on the Scala Swing library.
Brief mention of additional Design patterns in GRASP.

- Chap. 25 of [T]
  (recommended)
- Chap. 34 of [S]
Dec 6

From design to code. Examples.
General feedback on Part A of course project.

- Chap. 20 of [T]
 




Course Info

  Announcements

  Lectures

  Syllabus

Course Work

  Project

  Exams

Resources

  External

  Internal

  Readings

  ICON