Suddivisione dell'attività didattica
LIMONGELLI CARLA
Obiettivi
Foundations of Computer ScienceTo provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications. Specific objectives are:- To introduce computer science as a discipline for automatic problem solving;- To examine basic concepts related to programming electronic computers; in particular, syntax and semantics, methods and techniques for formal programming, algorithm efficiency and correctness;- To introduce programming techniques such as iteration and recursion;- To introduce fundamental data structures such as arrays and lists.
To provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications, emphasizing the role of Computer Science as a discipline for the automatic solution of problems.
Specific objectives:
- To understand the essential elements related to computer architecture and operating systems, as well as information representation;
- To gain the ability to design and code simple algorithms using structured programming and basic programming techniques such as iteration, as well as elementary data structures;
- To understand and use testing methodologies (debugging) for the produced code.
Risultati Apprendimento Attesi
At the end of the second module, students will be able to use dynamic data structures such as structs, files, pointers, and linked lists, apply dynamic memory allocation and recursive programming techniques, analyze sorting and searching algorithms and evaluate their complexity using Big-O notation and best-, worst-, and average-case analysis, and critically develop, test, and evaluate programs and algorithms in terms of correctness, efficiency, readability, reusability, and maintainability, up to the autonomous development of simple complete software applications.Programma
* Basic concepts *Top-down design principles
Decompositions and reductions between problems
Recursion
*Operations*
Basic operations for persistent data management (CRUD)
Use and manipulation of collections
*Data Structures*
Sets
Lists
Maps
* Advanced concepts *
Asymptotic notation
Recursion
Integrated development environments
Libraries
Files
Prerequisiti
The course does not require any prerequisite.Testi Adottati
A. Bellini, A. Guidi, "Linguaggio C. Una guida alla programmazione con elementi di Python", VI Edition, McGraw-Hill.Modalità Frequenza
Attendance is not compulsory, but it is strongly recommended.Modalità Valutazione
The exam consists of some multiple-choice answers (25 minutes, 17 questions, up to grade 8,5 points) and of some programming exercises (120 minutes, 3 questions, up to 24 grade points), to be realized on a computer. Two intermediate examinations, together with a preliminary one, replace the exam, if passed with success. Student assessment is based on the Dublin Descriptors and takes into account the level of knowledge, understanding, and critical processing of the topics covered in the course. Students who demonstrate that they have acquired the fundamental concepts and are able to apply them in simple contexts will receive a passing grade. Average grades will be awarded to those who, in addition to mastering the basics, show the ability to analyze and independently elaborate on more complex concepts. The highest grades are reserved for students who demonstrate in-depth understanding, synthesis skills, critical thinking, and autonomy in solving problems, including new ones or those not explicitly addressed during the course.Esempi Domande
Build an application to manage a list of tennis players.Define two structures to represent a tennis player and a list node. For each player, the player's name (a string), ATP ranking (an integer), and preferred surface type (a string) must be represented. Define a main function that creates the list and manages user interaction. The main function is already partially implemented in a liste.c file that can be downloaded from Moodle.
Define a function that displays the list of players.
Define a function that inserts a new player at the end of the list.
Define a function that deletes all players immediately preceding a player whose name begins with S. If this operation does not result in any deletion, the user must be informed of this. For example, if the list initially contains the players [Flavio Cobolli] -> [Francisco Cerundolo] -> [Sascha Zverev] -> [Ignacio Buse] -> [Sebastian Korda] -> [Stefanos Tsitsipas], the operation transforms the list to [Flavio Cobolli] -> [Sascha Zverev] -> [Stefanos Tsitsipas]. Note that Sebastian Korda is deleted because he precedes Stefanos Tsitsipas, and that, after the deletion, it is still possible for a player whose name begins with S to be followed.
Submit only the .c file containing the source code.
DA LOZZO GIORDANO
Obiettivi
Foundations of Computer ScienceTo provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications. Specific objectives are:- To introduce computer science as a discipline for automatic problem solving;- To examine basic concepts related to programming electronic computers; in particular, syntax and semantics, methods and techniques for formal programming, algorithm efficiency and correctness;- To introduce programming techniques such as iteration and recursion;- To introduce fundamental data structures such as arrays and lists.
To provide the basics of "computer culture" through the introduction of effective methodological and conceptual tools, aiming to face in a flexible way the evolution of technology and the broad world of applications, emphasizing the role of Computer Science as a discipline for the automatic solution of problems.
Specific objectives:
- To understand the essential elements related to computer architecture and operating systems, as well as information representation;
- To gain the ability to design and code simple algorithms using structured programming and basic programming techniques such as iteration, as well as elementary data structures;
- To understand and use testing methodologies (debugging) for the produced code.
Risultati Apprendimento Attesi
To provide the fundamental skills concerning the “top-down approach” to algorithm design and modular programming, as well as the main methods that allow performing both qualitative and quantitative comparisons among different algorithmic solutions.Specific objectives:
- To understand and apply problem-solving techniques for algorithm design, with particular reference to approaches based on problem decomposition and simplification;
- To understand and apply modular and recursive programming paradigms;
- To understand and apply methodological tools for the asymptotic evaluation of algorithm efficiency;
- To understand and apply both formal and pragmatic techniques for algorithm correctness verification and program validation;
- To gain practical skills in using fundamental data collections in code development.
Programma
* Basic concepts *Problems, algorithms, and programs
Computer architecture
Languages and Compilation
Style and conventions
I / O, variables and constants
* Operations *
Information representation
Binary arithmetic
Types of data
Expressions
Boolean algebra
* Control structures *
Selection
Iteration
Functions
* Data structures *
Array
Strings
Matrices
* Advanced concepts *
Recursion
Integrated development environments
Errors
Libraries
File
Prerequisiti
The course does not require any prerequisite.Testi Adottati
A. Bellini, A. Guidi, "Linguaggio C. Una guida alla programmazione con elementi di Python", VI Edizione, McGraw-Hill.Modalità Erogazione
In-person classes and in-class labs (except for periods of sanitary emergency). Attendance is not compulsory, but it is strongly recommended.Modalità Frequenza
Attendance is not compulsory, but it is strongly recommended.Modalità Valutazione
The exam consists of some multiple-choice answers (25 minutes, 17 questions, up to grade 8,5 points) and of some programming exercises (90 minutes, 10 questions, up to 24 grade points), to be realized on a computer. Two intermediate examinations, together with a preliminary one, replace the exam, if passed with success. Student assessment is based on the Dublin Descriptors and takes into account the level of knowledge, understanding, and critical processing of the topics covered in the course. Students who demonstrate that they have acquired the fundamental concepts and are able to apply them in simple contexts will receive a passing grade. Average grades will be awarded to those who, in addition to mastering the basics, show the ability to analyze and independently elaborate on more complex concepts. The highest grades are reserved for students who demonstrate in-depth understanding, synthesis skills, critical thinking, and autonomy in solving problems, including new ones or those not explicitly addressed during the course.Esempi Domande
The following program contains a function main (), which must not be changed. Extend it by creating a function, called estraiIntero, which:• has as a unique formal parameter consisting of an array of characters, named stringa, and
• has return type int.
Implement the function so that the input string, which is supposed to only contain numerical symbols, be converted into the corresponding integer.
In the event that the string received as a parameter should be empty, the function will have to return the integer 0.
In the event that the string received as a parameter should contain a number larger than the largest positive 32-bit integer, the circularity of the representation of the integers must be exploited.
For example, if the string received as a parameter is "1234", the function will have to return the integer 1234. If the string received as a parameter is "00547", the function will have to return the integer 547. If the string received as a parameter is "", the function will have to return the integer 0. If the string received as a parameter is "2147483648", the function will have to return the integer -2147483648
Note: the ASCII code for the character '0' is 48; The ASCII code for the character '1' is 49; The ASCII code for the character '2' is 50, and so on.
Note: you can use the POW function, defined in math.h. Example of use: POW (3, 4) is equivalent to three raised to the fourth and returns 81.
Note: It is not allowed to use the atoi function defined in stdblib.h, or any other function belonging to other libraries that implements the required behavior.
Note: in a comment that precedes the function estraiIntero provide its specification (expressed as input, pre-conditions, output, post-conditons) and the type of the problem it solves.
