FOUNDATIONS OF COMPUTER SCIENCE P - Z

Academic Year 2022/2023 - Teacher: Michele Giuseppe MALGERI

Expected Learning Outcomes

Knowledge and understanding abilities

  • Basic knowledge of computer architecture
  • Knowledge of the principles of computer science and procedural programming
  • Knowledge of the main data structures and understanding of the operating mechanisms
  • Knowledge of search and sorting techniques
  • Knowledge of the rudiments of computational complexity

Applying knowledge and understanding abilities

  • Ability to develop programs in ANSI C to solve problems using the most important data structures (stacks, lists, queues)
  • Ability to analyze the code and correct errors during the development phases
  • Ability to solve problems and defining "problem solving" algorithms
  • Ability to use a development environment (IDE)

Ability of making judgements

  • The student is able to evaluate the most suitable algorithms to solve a given problem

Communication skills

  • The student acquires knowledge of computer languages and technical terminology

Course Structure

The course is organized into elementary didactic units based on the contents and skills to be developed.

The course includes lectures as the main teaching method. Lectures are accompanied by exercise sessions are designed with the aim of acquiring the basic theoretical knowledge and all the syntactic elements, acquiring the ability to solve problems, applying the knowledge, using development environments and methodologies.

The teacher also proposes individual exercises that consist in solving a problem that the student is asked to face with autonomously and subsequently solved and discussed in class.

Should teaching be carried out in mixed mode or remotely, it may be necessary to introduce changes with respect to previous statements, in line with the programme planned and outlined in the syllabus.

Learning assessment may also be carried out on line, should the conditions require it.

 

Detailed Course Content

Module 1

  • Information processing and algorithms - Algorithms and programs - A graphic notation for algorithms representation - Programming languages - Programs design.
  • Information representation: Numerical systems - Numerical systems conversion - Binary number system - Binary number operations - overflow and underflow - Integers representation - Numbers with sign representations - Fixed-point and floating-point representation - Characters representation - Boole's Algebra, Logical Functions, Logical Expression, Applications of Boolean algebra.
  • Computer organization overview: computer organization: main memory, central unit, instruction set architecture.
  • Basics on computer systems: basic software: Translation and program execution - programming environment - Programming languages: imperative languages - Compilers, Linkers, Implementation briefs: Preprocessor - Comments - Libraries and header files.

Module 2

  • C language fundamental elements: C syntax - Structure of a C program - Compiling a program - Types of data and representations - Main data types - Identifiers - Variables - Access modifiers - Constants - Operators - Control structures - Selection instructions - Iteration instructions - Jump instructions - Expression instructions - Block statement.
  • Arrays, strings and pointers: One-dimensional arrays - Array pointers - Arrays as a function argument - Strings - String arrays - Multidimensional arrays - Pointer variables - Operators and expressions with pointers - Array pointers - Function pointers.
  • Functions: Function visibility rules - Function arguments - Main arguments - Return statement - Return values from a function - Recursion - Identifiers declarations and field of action - Parameter binding techniques - side effects and function implementation.
  • User-defined structures, unions and types: Structures - Arrays of structures - Structures as arguments of functions - Pointers to structures - Arrays and structures within other structures - Union - Enumerations - Sizeof - Typedef.
  • I/O from file and console: Read and write characters and console strings - Console-formatted I/O - Channels - File.

Module 3

  • Dynamic memory allocation.
  • Computational Complexity: Program Efficiency, Notations O and W, Program complexity evaluation.
  • Sorting algorithms: Sorting algorithm classes - sorting by selection (selection sort) - insertion algorithms (insertion sort) - bubble sort exchange algorithms, quick sort, merge sort.
  • Abstract data types: Lists, Queues, Stacks, Binary Trees.

Textbook Information

[Be] Belagurusamy. Programming in ANSI C McGraw-Hill

Course Planning

 SubjectsText References
1UDE 1 (competenze minime): Rappresentazione dei numeri interi e dei numeri reali. Algebra di boole, funzione ed espressioni logicheAppunti del docente - [Pel] Capitolo 1, [Pel] Appendice C - [BeGu] Capitolo 1, 2 [BeGu] App. D, E
2UDE 1: Cenni sui sistemi di elaborazione; Traduzione ed esecuzione dei programmi; Ambiente di Programmazione; Linguaggi di Programmazione; Operazioni tra numeri binari; Codifica dei caratterippunti del docente - [Pel] Capitolo 1, [Pel] Appendice C - [BeGu] Capitolo 1, 2 [BeGu] App. D, E
3UDE 2: Tipo di dato principale; Identificatori; Variabili; Modificatori di Accesso; Specificatori di classe di memorizzazione; Costanti; Operatori; Strutture di Controllo; Istruzioni di selezione, di iterazione, di salto, di espressione, di bloccoPel] Capitolo 2,4,5 - [BeGu] Capitolo 3, 4, 5, 6, 7, 8, 9
4UDE 2: Algoritmi e programmi; Uso di notazione grafica per esprimere algoritmi; Espressioni ComplessePel] Capitolo 2,4,5 - [BeGu] Capitolo 3, 4, 5, 6, 7, 8, 9
5UDE 3: • Array Monodimensionali; Puntatori; Puntatori ad array; Stringhe; Strutture e strutture nidificate; Array di strutture[Pel] Capitolo 3,7,8,11 - [BeGu] Capitolo 10, 13, 14, 16
6UDE 3: Puntatori a strutture; Unione; Enumerazione[Pel] Capitolo 3,7,8,11 - [BeGu] Capitolo 10, 13, 14, 16
7UDE 4:Lettura e scrittura di caratteri e stringhe; I/O formattato; Canali; File di testo; Esercizi sugli argomenti svolti nelle UDE 1,2,3,4[Pel] Capitolo 11 - [BeGu] Capitolo 17, 19 [Pel] Capitolo 6,9,10 - [BeGu] Capitolo 11, 1
8UDE 4: File Binari[Pel] Capitolo 11 - [BeGu] Capitolo 17, 19 [Pel] Capitolo 6,9,10 - [BeGu] Capitolo 11, 15
9UDE 5: Algoritmi di ricerca e ordinamento in memoria interna: classi di algoritmi; Esempi di Algoritmi di ordinamentoDISPENSE DEL DOCENTE
10UDE 5: Complessità computazionale; la notazione O e Omega grande; Cenni sulla valutazione della complessità di un programmaDISPENSE DEL DOCENTE
11UDE 6: • Algoritmi di ricerca e ordinamento in memoria interna: classi di algoritmi • Esempi di Algoritmi di ordinamentoDISPENSE DEL DOCENTE
12UDE 6: Complessità computazionale, la notazione O e omega, Cenni sulla valutazione della complessità di un programmaDISPENSE DEL DOCENTE
13UDE 7: Strutture dati lineari: Liste, Pile, Code; Strutture dati annidate; Esercizi sugli argomenti svolti nelle UDE 5,6,7DISPENSE DEL DOCENTE
14UDE 7: Strutture dati non lineari: Alberi, e tabelle HashDISPENSE DEL DOCENTE

Learning Assessment

Learning Assessment Procedures

Two ongoing test or a final exam

The minimum skills required to pass the exam are as follows:

Knowledge:

  • Basic knowledge of programming paradigms
  • Knowledge of the complete process oc prgram creation from source to executable programs
  • Ability to carry out simple decimal / binary conversions and vice versa
  • Ability to use Boolean functions and expressions
  • Knowledge of the different types of sorting algorithms
  • Ability to use elementary data structures (stacks, queues and lists)
  • Ability to solve computer problems through the decomposition into elementary functions
  • Syntax and semantics of the ANSI-C language:

Ability

  • Ability to solve basic computer problems through the use of selection and iteration instructions
  • Ability to solve computer problems that require the use of one-dimensional vectors
  • Ability to use formal functions and parameters and the return statement
  • Heap memory management capability, through simple dynamic allocation of elements and vectors
  • Ability to use text files to persist information.
  • Ability to implement simple sorting algorithms using internal memory
  • Ability to implement and use elementary data structures (stacks, queues and lists)

The criteria adopted in the evaluation are based on the relevance of the answers with respect to the questions asked, on the quality of the contents, on the ability to report examples, and on the correct use of technical language and the overall expressive capacity of the student.


ONGOING TEST

There are two ongoing tests during the course.

First test

The first test consists of a computer work which can be carried out remotely and / or in the laboratory, which includes the ability to develop a simple program in ANSI C (according to the skills provided in the Didactic Units 1,2,3,4). Time 30 - 60 minutes

Passing the first ongoing test allows access to the second ongoing test.

Second test

The second in test consists of a computer test (from 60 to 90 minutes) which can be carried out remotely and / or in the laboratory and by an oral interview. There are no limits to the grade. The computer test serves as admission to the oral exam.

The oral exam, in presence and / or remotely, involves a discussion on the preliminary tests carried out and in-depth analysis of the entire program.


EXAM

The exam consists of two preliminary computer tests and an oral test, which can be carried out in person and / or remotely. Access to the oral exam is subject to passing both computer tests.

First preliminary test

The first preliminary test (in analogy with the first ongoing test) consists of a computer work, which can be carried out remotely and / or in the laboratory (30 minutes) which includes the ability to develop a simple program in ANSI C (in accordance with the skills provided in the Didactic Units 1,2,3,4,5).

Second preliminary test

The second preliminary test consists of a computer work (from 60 to 90 minutes) (numerical evaluation is not required) which can be carried out remotely and / or in the laboratory.

Oral interview

The oral interview includes a discussion on the preliminary tests carried out and in-depth analysis of the entire program.

VERSIONE IN ITALIANO