FOUNDATIONS OF COMPUTER SCIENCE A - E

Academic Year 2022/2023 - Teacher: Vincenza CARCHIOLO

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

Learning ability

  • Being able to learn new programming languages and paradigms
  • Be able to use the knowledge and skills learned to tackle complex problems methodologically

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: 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 caratteriAppunti 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: Funzioni; Istruzione return; Passaggio di parametri; Allocazione dinamica della memoria [Pel] Capitolo 6,9,10 [BeGu] Capitolo 11, 15  
10UDE 5: Ricorsione e Record di Attivazione; Variabili locali, regole di visibilità e tempo di vita; [Pel] Capitolo 6,9,10 [BeGu] Capitolo 11, 15
11UDE 6: • Algoritmi di ricerca e ordinamento in memoria interna: classi di algoritmi • Esempi di Algoritmi di ordinamento DISPENSE 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, HashDISPENSE DEL DOCENTE
VERSIONE IN ITALIANO