Computer Programming with Laboratory (2016/2017)

Course code
Name of lecturer
Ugo Solitro
Ugo Solitro
Number of ECTS credits allocated
Academic sector
Language of instruction
II sem., I sem.

Lesson timetable

II sem.
Day Time Type Place Note
Tuesday 10:30 AM - 1:30 PM lesson Lecture Hall E  
Wednesday 11:30 AM - 1:30 PM laboratorio Laboratory Delta  
I sem.
Day Time Type Place Note
Tuesday 11:30 AM - 2:30 PM lesson Laboratory Delta  
Friday 8:30 AM - 11:30 AM lesson Lecture Hall E  
Friday 2:30 PM - 4:30 PM lesson Lecture Hall E  

Learning outcomes


This course proposes providing the fundamentals skills in order to analyze and resolve problems by means of developing programs.
The general objectives of this module are
- the knowledge of the principles of programming and of programming languages,
- the mastery of fundamental techniques for analyzing problems and developing their algorithmic solutions,
- the introduction to the methods for the evaluation of correctness and efficiency of algorithms.

In the laboratory, we will practice the above principles by means of a programming activity.


# Contents
(concise version, updating)

## Introduction.

- Problems and Solutions.
- Models of Computations:
- abstract machine, compiler and interpreter.
- Programming languages: formal languages, compiler, interpreter.
- Laboratory: introduction to linux and to the developing environment.

## Part I - problems, algorithms and programs.

- Imperative programming
- Elementary of programming:
- basic instructions and development of simple programs;
- variables, expressions and assignment.
- Data types. The general concept of data type: characterisation and data representation. Abstract Data Types.
- Primitive data types: characterisation, use and related problems.
- Structured data types: array, record, file, pointer, string and other data structures.
- Program structure.
- Fundamental instructions.
- Sub-programs: structure, parameters and visibility.
- Recursion.
- Object Oriented Programming.
- Basics of objects: classes, objects, attributes, constructors, modifiers.
- Advanced data structures:
- Representation of sequences, vector and matrices.
- Inductive and dynamic data structures.
- Introduction to lists, trees and graphs.

## Part II - Analysis of Algorithms

- Correctness: termination, logic properties; methods for the correctness verification.
- Efficiency of algorithms.
- Introduction to the complexity. Performance of algorithms. Evaluation of efficiency. Computational costs.
- Asymptotic estimation of the complexity in time and space. The worst and medium case.
- Amortised analysis.
- Study of fundamental examples.
- Sequences: static and dynamic implementation and algorithms.
- Research and Sorting Algorithms: basic search, binary search, insertion and selection sort, merge sort, quick sort.
- Matrices and Vectors: implementation, operations and algorithms.
- Dynamic sequences: abstract definition and implementation; basic operations.
- Trees. Abstract definition and implementation. Basic operation. Binary research trees.
- Introduction to algorithms on graphs.

## Laboratory.

In the laboratory, we familiarize with the programming language developing projects based on the ideas presented in the lessons.
We study the fundamental elements of the language and we deal with the problems that arise in the development of the solution; in particular we acquire skill in editing, compiling, debugging and basic project management.

# Didactic method

(concise version)

The subjects will be presented, when possible, according to the following schema.

- Introduction to the subject.
- Analysis of the problem related.
- In-depth study of the subject through the development of exercises, even practical, with the support of the teacher and tutors, if available.
- Correction of some exercises.
- Final discussion on the activities.

Reference books
Author Title Publisher Year ISBN Note
Bertossi, Alan e Montresor, Alberto Algoritmi e strutture di dati Città Studi Edizioni, De Agostini Scuola 2010 9788825173567 Testo di riferimento per gli Algoritmi e le Strutture Dati
Walter Savitch Programmazione con Java (seconda edizione) (Edizione 2) Pearson 2013 9788871929613 Testo di riferimento per il linguaggio Java

Assessment methods and criteria

# Exam structure

The final exam is on all the contents of the course.

It is structured in three parts:

- a written test (wight 0.5),
- a practical activity (weight 0.2),
- an oral examination (weight 0.3).

The final grade is obtained evaluating the weighted average of the three parts.

## Written test

The written test is about the fundamentals of programming and algorithms and includes

- general questions
- exercises

Through the exercises the students have to show to be competent in ...

- analysing and characterise a problem described in natural language,
- developing a solution and implement it,
- analyse the correctness and efficiency of a concrete solution.

The written part can be substituted by the tests that can take place also during the teaching periods.

## Practical actives

The practical part consist in the discussion of the laboratory activities and in the presentation of a project.

## Oral examination

The final oral part is a discussion on the examination papers, the practical activity carried out during the practical activities and the subject matter of the course.

## Evaluation parameters

During the evaluation of answers the teacher will consider in particular the relevance, the correctness, the clearness, the rigour, and the conciseness.

More the participation to the ongoing activities will be positively evaluated.