Salta al contenuto principale della pagina

## PROGRAMMING 2

CODE 48382 2021/2022 7 cfu during the 2nd year of 8766 STATISTICA MATEM. E TRATTAM. INFORMATICO DEI DATI (L-35) - GENOVA 7 cfu during the 3nd year of 8760 MATEMATICA (L-35) - GENOVA 7 cfu during the 1st year of 9011 MATEMATICA(LM-40) - GENOVA 7 cfu during the 2nd year of 9011 MATEMATICA(LM-40) - GENOVA INF/01 Italian GENOVA 1° Semester AULAWEB

## OVERVIEW

We introduce:
concepts of algorithm, data type (values + operations), implementation, techniques for evaluating the complexity of an implementation;
basic principles of object oriented programming;
Java and Python languages with practical exercises.

## AIMS AND CONTENT

### LEARNING OUTCOMES

Introduction to: data types; algorithms, data structures and complexity evaluation; object-oriented programming; Java language; Python language; programming exercises in the two languages.

### AIMS AND LEARNING OUTCOMES

A data type (consisting of stored values and operations acting on them) is the ideal counterpart of a software module. The process leading from a data type to a software module includes the definition of data structures (to store data in memory) and algorithms (to perform the operations).
An algorithm is the stepwise description of a procedure producing an output from an input. The same input-to-output transformation can be achieved through different algorithms.
In order to choose among the possible alternatives, it is recommented to evaluate their computational complexity (memory and execution time) with suitable techniques. The final step consists of writing code in a programming language.

After attending, the student will be able to evaluate the complexity of simple data structures and algorithms.
He/she will know some classic algorithms and some classic data types and will be able to implement them.
He/she will know the object oriented programming paradigm and the main parts of the Java and Python programming languages.
He/she will be able to write structured programs in Java and simple programs in Python.

### PREREQUISITES

Knowledge of the basic concepts of an imperative programming language: instruction, variable, cycle, function, argument, result, typing of variables.

Knowledge of the basic concepts of mathematics and logics: operation, argument, result, domain, codomain, logical operators.

### TEACHING METHODS

Coordinated lessons in classroom and in laboratory. About 2/3 of the teaching time will be in laboratory.
Assignments (in Java and in Python) will be part of the exam (see exam and assessment methods).

### SYLLABUS/CONTENT

Concepts of data type, algorithm, implementation.
Introduction to space and time complexity, and evaluation techniques (for iterative and recursive algorithms).
Some classic data types: stack, queue, dictionary.
Some algorithms for classic problems: sorting and/or operations on graphs.
Object-oriented programming paradigm and Java language: Classes and objects, equality and copy of objects, constructors, clientship, inheritance, overriding, exceptions.
The Python language: Interactive environment, dynamic typing, container types (list, tuple, dictionary) and operations, functions, classes, inheritance, exceptions.
Practical exercises in the two languages.

Course notes available on aulaweb (in Italian).
On-line manual and tutorials (in English).

Books in English:
M.T.Goodrich, R.Tamassia, M.H.Goldwasser, Data structures and algorithms in Java, John Wiley & Sons. (2014)
C.Horstmann, R.D.Necaise, Python for everyone, John Wiley & Sons.(2018)

## TEACHERS AND EXAM BOARD

### Exam Board

PAOLA MAGILLO (President)

DAVIDE ANCONA

ELENA ZUCCA (President Substitute)

## LESSONS

### LESSONS START

The class will start according to the academic calendar.

### Class schedule

All class schedules are posted on the EasyAcademy portal.

## EXAMS

### EXAM DESCRIPTION

The exam consists of: assignments to be developed during the teaching period, and an oral part.
The assignments remain valid for the entire academic year, until September 2022 (included).

### ASSESSMENT METHODS

During the semester, two assignments will be given, one in Java and one in Python.
Such assignments are to be developed in groups of two students and will require to deliver code and documentation.
The correctness and the quality of both code and documentation will be evaluated.
The deadline for such assigments is the end of the semester.
A brief and informal discussion (possibly on-line) will follow, in which the two students will be asked to issustrate the main points of their work.

The oral exam will ask questions about the teaching program, and may involve writing examples in code or pseudocode. The student will be required to show  understanding ofthe concepts and ability to use the techniques seen in the lessons

### Exam schedule

Date Time Location Type Notes
10/01/2022 09:00 GENOVA Laboratorio
31/01/2022 09:00 GENOVA Laboratorio