
Course unit
PROGRAMMING
SC02121720, A.A. 2019/20
Information concerning the students who enrolled in A.Y. 2019/20
ECTS: details
Type 
ScientificDisciplinary Sector 
Credits allocated 
Basic courses 
INF/01 
Computer Science 
10.0 
Course unit organization
Period 
Annual 
Year 
1st Year 
Teaching method 
frontal 
Type of hours 
Credits 
Teaching hours 
Hours of Individual study 
Shifts 
Laboratory 
3.0 
24 
51.0 
No turn 
Lecture 
7.0 
56 
119.0 
No turn 
Prerequisites:

Some knowledge of computer architecture. 
Target skills and knowledge:

The ability to specify a problem through a pre and a postcondition that must be obeyed by the program that we wanto to build in ordere to solve the problem. The ability to write a program in C++ and show that it actually computes what is specified in its pre and postcondition. The ability to device also recursive solutions to problems and to show their correctness through an inductive proof. Some knowledge of the basic notions of imperative programming: simple commands, pointers, arrays, functions, passing parameters by value and by reference, userdefined types, dynamic memory, programs distributed on several files, and exceptions. 
Examination methods:

The exam consists of a written proof with some theoretical questions and a programming exercise. In the programming part the students are asked to develop a iterative and a recursive program. For both programs the correctness proofs are requested. The exam takes place in the computer laboratory and students receive the assignment and turn in their solution via computer.
In order to be admitted to the exams, students must turn in the solutions of some exercises that are assigned during the course. 
Assessment criteria:

The exam is constructed to measure the ability of the students to find simple solutions to problems and to express their ideas in a precise manner. In particular, one evaluates the ability of a student to specify a problem, to build a program to solve it, and finally, to explain why the solution solves the specified problem. Simplicity and clarity are appreciated very much. 
Course unit contents:

There are two interacting subjects of this course:
1) On the one hand notions about correctness à la Hoare are taught. The main concepts are that of pre and postcondition and of invariant of a cycle. Each program is accompanied by a pre and postcondition and its correctness with respect to them must be proven in a convincing way.
2) Simultaneously to part (1), students learn the basic notions of imperative programming with C++. In particular, predefined types, simple commands, pointers, array, pointer arithmetic, functions, recursive functions, dynamic memory, concatenated lists and binary trees. 
Planned learning activities and teaching methods:

We follow the approach that one learns to program by programming a lot and receiving feedback about the solutions turned in. Therefore, each week, programming exercises are proposed to students. The exercises are posted on a moodle platform that also allows students to tun in solutions and to test them against some specific inputs. In this way, students, at each moment of the course, can estmate their progress with respect to solving the exercises that have been assiged till then. Turning in correct (wrt tests) solutions for some of these exercises is compulsory in order to be admitted to the exams.
The exams take place in the computer laboratory and use moodle just as the normal weekly exercises. The course consists of 80 hours of course work of which 24 take place in the laboratory. The course is be divided in 2 parts: the first one of 2 credits takes place during the first semester and the second one of 8 credits during the second semester.
The aim of the first part is twofold: on the one hand, to give to students the initial ability to write and execute programs on a computer and, on the other hand, to present them with the first notions of program correctness. 
Additional notes about suggested reading:

The course uses a moodle site in which students can find all useful documents for the course: the course rules, the slides of the classes, weekly exercises that students can solve and test, and finally, the access to all recorded lectures. 
Textbooks (and optional supplementary readings) 

Gilberto Filè, Programmazione consapevole. Padova: Progetto, 2014.


