Anno accademico 2020-2021


Giorgio Brajnik
Alex Falcon
Anno di corso: 2
Totale crediti: 9
Tipologia: Caratterizzante
Periodo didattico: Primo Periodo
Prerequisiti. Programming experience in Java, ability to install applications in one’s own PC, basic notions of the operating system. Examples discussed during the lectures will refer to a recent Ubuntu distribution.
Metodi didattici. Frontal lectures with slides. Interactive discussions and exercises done during lectures. Pratical demos.
Modalità di verifica. The exam is based on a closed-questions questionnaire, a written exercise and a possible oral examination.
Altre informazioni. none


The goal of the course is to let students develop the ability to “think with objects” when designing and building a complex software system (thousands of units built by tens of programmers). At the end of the course the student should: have understood how to assign responsibility to a set of classes, have understood how to define the APIs of different units, have understood how to define abstractions and how to specify them.

Furthermore, the student should have developed practical experience in using typical programming tools, including Eclipse, Intellij, git, maven.


Abstraction types: parameterization, procedural specification, dataabstraction, type abstraction, iteration abstraction.Java basics: packages, classes, objects, variables, memory allocation, mutability. Method calls, type checking, overloading; dispatching; base types, parametric types.

Procedural abstraction: specification, contracts, pre and post-conditions, assertions, exceptions. Checked and unchecked exceptions, reflection and masking; overloading.

Data abstraction: abstract data types, abstract and concrete specification, invariants.

Abstraction of iteration: iterators.

OO Design with Card-Responsability-Collaboration. State, behavior and protocol. Single Responsibility Principle.

Abstraction on types: abstract classes, interfaces; substitution principle, equality, polymorphism, inheritance. Parametric types, internal classes, anonymous classes. Dependency inversion.

Functional programming in Java.

Design patterns: factory, builder, decorator, observer.


Main textbook: B Liskov e J Guttag. Program Development in Java:Abstraction, Specification and Object Oriented Design, 2001. ISBN: 0201657686. Addison-Wesley Professional.

J. Bloch. Effective Java, Addison-Wesley Professional; 3 edition (January 6, 2018), ISBN-13: 978-


Complementary books: R. Martin. Clean Code: A Handbook of Agile Software Craftsmanship. ISBN-13: 978-0132350884, Prentice Hall; 1 edition (August 11, 2008).