Single channel
Chair (Coordinator) and Rapporteur: IVANO SALVO
Lecturers
Objectives
* General objectives
Acquire object--oriented programming paradigm. Use of object-oriented logic in the design of medium-size software applications. Comparison among different programming languages paradigm (imperative, functional, and object--oriented) to speed-up learning of
new programming languages.
* Specific objectives:
a) Knowledge and understanding:
Basic and advanced aspects of C++ language. Basic knowledge of Haskell.
General principles of object--oriented and functional programming.
b) Apply knowledge and understanding:
Apply object--oriented methodology to the design of medium-size software application.
Apply functional principles to problem-solving, even when programming with an
imperative language such as C.
c) Critical Judgemental skills
The comparative study of several programming languages paradigm
allow student to evaluate, for example, which is the most suitable
language to use to develop a given software application.
d) Communication skills
Students are stimulated, both during lectures and in the oral examination,
to expose functional requirements as well as design structure of a
medium-size software application.
e) Learning ability
The comparative study of several programming languages paradigm
gives to students the ability to focus on fondamental aspects of programming
languages (parameter passing rules, type systems, language semantics)
and this greatly improve their ability to learn new programming languages.
Also the ability to learn technical aspects (such as libraries, use of developer tools)
will benefit from this studies.
Learning outcomes
Knowledge and understanding: functional and OO programming, writing Haskell/C++ programs, design reusable components and abstractions.
Applying knowledge and understanding: apply functional design to problem solutions, even when using an imperative/OO programming language;
Making judgements: language choice for a software project, devise bugs in a medium size software project.
Communication skills: describe abstractly, but precisely, software functional features;
Learning skills: learning easily new new programming languages, focusing on critical aspects of programming language semantics.
Prerequisites
Students are supposed to have a good knowledge of C programming, and basic algorithms solving classical problems, as learned in courses such as Laboratory di Programmazione e Calcolo (first year) and Informatica Generale (second year).
Programme
Program:
Part I: Object-Oriented Programming and C++
1. Introduction to object--oriented programming.
2. Goals of C++ language.
3. Class definitions. Fields and methods. Method invocation.
4. Access modifiers. Interface and implementation of an object.
5. Constructors. Objects on the stack and on the heap. Destructors.
6. Inheritance.
7. Dynamic binding and virtual methods (C++ polymorphism).
8. Object--oriented programming methodologies. Example of decomposition of a medium size application into classes.
9. Templates. Data structures as templates. The Standard Template Library.
10. Towards a methodology of errors handling: Exceptions.
Part II: Functional Programming and Haskell
11. Introduction to functional programming with basic Haskell.
12. Polimorphic types and lazy evaluation in Haskell.
Books
We suggest the following books:
1. Bruce Eckel. Thinking in C++ (2nd edition), Prentice Hall, 2000.
2. Graham Hutton. Programming in Haskell, Cambridge University Press, 2007.
Several other materials, such as C++ and Haskell programs, solution to past homeworks, etc. are made available on the course web page.
Several web-resources on C++ and Haskell are recommended to students.
Lessons mode
Lessons are traditional with slides.
Blended lessons will be available depending on pandemic evolution.
Frequency
Following lectures is highly recommended.
Exam mode
The exam consists of an oral discussion of a medium-size C++ program written by the student.
Correctness of the program as well as program structure and cleanliness of code are
evaluated. The oral exam includes also a discussion about how programming principles
presented in classroom lectures have been applied in the program.
This course does not include a final mark, but just an adequacy judgement (pass/fail).
Example exam questions
Oral discussion of homeworks.
Writing small C++ classes or small Haskell functions on lists.
Arguments
- Programmazione Funzionale in Haskell
- Programmazione a Oggetti in C++
Sustainability goals
- Academic year2024/2025
- Degree program to which the course belongsMathematics
- Lesson codeAAF1267
- Year and semester3rd year - 1st semester
- Activity typeUlteriori attività formative (art.10, comma 5, lettera d)
- Academic areaAbilità informatiche e telematiche
- Mandatory presenceNo
- Languageita
- CFU3 CFU
- Total duration36 hours
- Hours distribution36 training hours