COMPUTER PROGRAMMING I AND LAB. PROGRAMMING I
The two integrated modules (Computer Programming I and Laboratory of Computer Programming I, 12 CFU, unique examination) are an introductory course to computer programming. i.e. the methodologies and techniques for the development, analysis and implementation of algorithms. The course introduces the C programming language, used in laboratory activities (in team) for developing software products and the students’ projects.
Knowledge and understanding: The student must demonstrate knowledge and understanding of basic methodologies for the design and analysis of algorithms, the C programming language and its development framework.
Ability to apply knowledge and understanding: The student must demonstrate the ability to use their acquired knowledge to solve computationally simple application problems, even when they appear in concrete contexts, to develop algorithms and analyze their correctness and complexity, to use consciously the C programming language in order to implement efficiently an algorithm. Such ability is manifested even through the use of computational tools and advanced computer labs.
Autonomy of judgement: the student should be able to know to assess independently the results returned by an algorithm and its software implementation in C language.
Communication skills: the student should be able to draw up a report on an algorithm and to document its implementation in C language, also working in groups, using advanced writing/documentation tools. Moreover, the student should be able to use suitably the basic terminology of computer science, even in English.
Learning skills: students must be able to update and deepen topics and specific applications of basic computer science, even accessing on-line software repositories and other tools on the web.
Concept of algorithm – algorithms for human execution - algorithms to solve simple arithmetic problems.
Concept of Variable – variables and types: fundamentals on variables in programming – assignment operation-read/view – basic operations on variables in a programming language.
Introduction to C language – programming languages: machine language and high level languages, and translation programs – general aspects of the C language and "running" a C program – variables and types in C – pointers in C – Input/output C.
Control flow statements – selection – iteration - control flow statements in C.
Function and procedures – organise algorithms as function and procedures – functions in C – functions C that return multiple values.
Incremental approach – algorithms for computing sums – algorithm for computing the maximum element in a set of input data – algorithm for determining membership of a value to a set of input data (search algorithm) – algorithms for computing sums of powers and the greatest common divisor – functions C for basic arithmetic and application problems.
Data structures – fundamentals on the concept of elementary data structures – basic algorithms on array – sequential search – merging – algorithm for determining the equality of two arrays – basic algorithms on 2D array – fundamentals on arrays in C – functions C for basic problems with 1D and 2D arrays.
Arrays and sets – algorithms for union, intersection, inclusion, subtraction and equality – functions C for basic operations on sets – ENUM types and derived types in C.
Strings and text processing – elementary operations on strings: concatenation, mining – algorithms for text analysis and pattern discovery – strings in C –string library – functions C for word processing.
Efficiency of algorithms – definition of time and space complexity of an algorithm – the functions Time complexity and Space complexity – asymptotic complexity – complexity classes – optimality of algorithms –tractability and intractability of problems.
Array sorting – insertion sort – selections sort – sorting in C.
Recurrence formulas – Fibonacci formula: meaning in modelling, basic properties – functions C for implementing recurrence formulas.
Divide-and-conquer approach – basic Idea of "divide and conquer" –binary search algorithm – analysis of the efficiency of binary search – divide-and-conquer algorithms for sum and maximum of an array –fFunctions C for implementing binary search and doubling algorithms.
Recursive algorithms – recursive programming techniques – recursive algorithm for binary search – recursive algorithms based on incremental approach and divide-and-conquer approach – recursive functions in C.
Data structures: records – fundamentals on the heterogeneous data structures – STRUCT in C.
Pseudorandom numbers and stochastic simulations – fundamentals on pseudorandom numbers – functions C for random number generation and their use in stochastic simulations.
Textbooks and other teaching material
A. KELLEY, I. POHL; “C: didattica e programmazione”, Pearson Education Italia, 2004.
A. CIARAMELLA, G. GIUNTA: “Manuale di programmazione in C”, 2009. Scaricabile dalla piattaforma di e-learning del Dipartimento di Scienze e Tecnologie.
All lessons and laboratory activities are available as animated presentations in Flash format, with audio commentary by the professor; they are streamed through the e-learning platform of the Department of Science and Technology; slides (pdf and pps format) of all lectures are available on the same platform, together with online quiz, exercises, projects, and laboratory notes.
Learning assessment mode
The goal of the assessment procedure is to quantify, for each student, the degree of achievement of the learning objectives listed above.
The assessment procedure is precisely described in the e-learning platform of the Department of Science and Technology. In summary, the assessment procedure consists of an individual project (20% of the vote), a written examination (20% of the vote) and an oral examination (60% of the vote). The exam is passed only if all the three checks (project, written examination, oral examination) have been passed.