Unit PROGRAMMING I
- Course
- Programming and management of computer systems
- Study-unit Code
- 20010206
- Curriculum
- In all curricula
- Teacher
- Francesco Betti Sorbelli
- Teachers
-
- Francesco Betti Sorbelli
- Hours
- 42 ore - Francesco Betti Sorbelli
- CFU
- 6
- Course Regulation
- Coorte 2026
- Offered
- 2026/27
- Learning activities
- Base
- Area
- Formazione informatica, matematica e statistica di base
- Sector
- INFO-01/A
- Type of study-unit
- Obbligatorio (Required)
- Type of learning activities
- Attività formativa monodisciplinare
- Language of instruction
- Italian.
- Contents
- Fundamentals of programming and the C++ language. Data types, variables, operators, input/output and control structures. Functions, arrays, pointers, references and structures. Object-oriented programming: classes, encapsulation, constructors, dynamic memory, inheritance and polymorphism. Exceptions, debugging and generic programming using templates.
- Reference texts
- H. M. Deitel, P. J. Deitel, C++ How to Program. Slides, exercises and supplementary materials are provided by the lecturer through the UniStudium platform.
- Educational objectives
- The course introduces the fundamental principles of programming and provides the skills required to design, implement, test and debug C++ programs. By the end of the course, students will be able to analyse simple problems, express their solutions as algorithms and implement them using data types, control structures, functions, arrays, pointers and references. They will be able to define structures and classes, apply encapsulation, manage dynamic memory and use the fundamental concepts of object-oriented programming, including inheritance and polymorphism. Students will also be able to read and trace C++ code, identify errors and justify their main implementation choices.
- Prerequisites
- No previous programming knowledge is required. Basic mathematical knowledge, logical reasoning skills and familiarity with computer use are expected.
- Teaching methods
- The course consists of 42 hours of classroom teaching. Lessons combine theoretical concepts with the writing, analysis and discussion of C++ programs. Topics are supported by examples, guided exercises and code-tracing activities. Targeted exercises are assigned after lessons and subsequently discussed in class to progressively consolidate syntax, problem-solving and debugging skills.
- Other information
- Slides, exercises and course announcements are available through the UniStudium platform. Attendance and regular completion of the assigned exercises are strongly recommended.
- Learning verification modality
- The examination consists of an individual written test lasting up to two hours and thirty minutes, with no reference material allowed. It includes theoretical questions, exercises requiring the design and implementation of C++ programs on paper, and exercises involving code tracing and output determination. Students may be required to define functions, structures and classes, manage collections of objects and dynamic memory, and justify their design choices. Assessment considers the correctness of answers and code, the ability to apply the concepts, the clarity of the solution and the appropriate use of terminology.
- Extended program
- 1. Introduction to programming and C++. Compilation, linking and execution. Program structure.
2. Primitive types, variables, constants, conversions, casting and the sizeof operator.
3. Arithmetic, relational, logical and bitwise operators. Precedence and associativity.
4. Input and output. if, if-else and switch statements.
5. while, do-while and for loops. break and continue.
6. Functions: declaration, definition, parameters, return values, scope, overloading, default parameters and recursion.
7. One-dimensional and multidimensional arrays. C strings. Passing arrays to functions.
8. Pointers: addresses, dereferencing, nullptr, pointer arithmetic, double pointers and void*.
9. References and parameter passing by value, pointer and reference. Use of const.
10. Structures, arrays of structures and passing structures to functions.
11. Classes and objects: data members, methods, access levels, encapsulation, constructors and destructors.
12. const objects and methods, copy constructors and static members.
13. Code organisation using header and source files. Namespaces and extern declarations.
14. Friend functions and classes. Overloading arithmetic, relational and stream operators.
15. Dynamic allocation using new, delete, new[] and delete[]. Stack and heap, shallow copy, deep copy and the rule of three.
16. Exception handling. Debugging techniques and tools, assert and debuggers.
17. Single and multiple inheritance, access levels, constructors and destructors in class hierarchies and the diamond problem.
18. Polymorphism, virtual functions, override, abstract classes and virtual destructors.
19. Generic programming: function and class templates. - Obiettivi Agenda 2030 per lo sviluppo sostenibile
- Goal 4 – Quality Education. The course contributes to the development of digital, logical and problem-solving skills required for software design and implementation.