FOUNDATIONS OF COMPUTER SCIENCE

Academic Year 2022/2023 - Teacher: MAURIZIO PALESI

Expected Learning Outcomes

LEARNING OBJECTIVES

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 skills

  • Be able to learn new programming languages and paradigms
  • Be able to use acquired skills to methodically approach complex problems

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. 

Required Prerequisites

Exponential or scientific notation. Rounding numerical values.

Real numbers. Operations with real numbers. Power with rational and real exponent. Logarithm of a positive real number.

Function concept.

Vectors and Matrices: Operations with vectors and matrices.

Attendance of Lessons

The student is required to attend at least 70% of the lessons in order to access the mid-term exams.

Attendance is not required, although strongly recommended.

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: Structure of a computer: 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 foundamental 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 rnstructions - Jump instructions - Expression instructions - Block statement.
  • Arrays, strings and pointers: One-dimensional arrays - Array as a pointer - Arrays as a function argument - Strings - String arrays - Multidimensional arrays - Pointer variables - Operators and expressions with pointers - Function pointers - Dynamic memory allocation.
  • 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 - Dynamic allocation.
  • 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 - Tipedef.
  • 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, Recurrence relationships.
  • 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.

 Topics marked with (*) represent minimum knowledge.

Textbook Information

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

Learning Assessment

Learning Assessment Procedures

Two ongoing tests or a final exam both followed by an oral discussion.


Minimum skills required to pass the exam are as follows:

Knowledge

  • Basic knowledge of programming paradigms
  • Knowledge of the compilation toolchain
  • Ability to carry out decimal/binary conversions and vice versa
  • Ability to use Boolean functions and expressions
  • Understanding of the different types of sorting algorithms
  • Ability to use elementary data structures (stacks, queues and lists)
  • Ability to solve problems through the decomposition into elementary functions
  • Syntax and semantics of the ANSI-C language

Skills

  • 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 arrays
  • Ability to use formal functions and parameters and the return statement
  • Heap memory management through simple dynamic allocation of elements and arrays
  • Ability to manage text files and binary files
  • Ability to implement simple sorting algorithms
  • Ability to implement and use elementary data structures (stacks, queues and lists)

MID-TERM EXAMS

There are two mid-term exams.

First mid-term exam

The first mid-term exam consists in the development of a computer program in  30 to 60 minutes. The required skills are those belonging to UDEs 1, 2, 3, 4 (see section Programmazione). Passing the first mid-term exam gives right to the second mid-term exam.

Second mid-term exam

The second mid-term exam consists in the development of a computer program in 60 to 90 minutes followed by an oral interview. 

FINAL EXAM

The exam consists in the development of two computer programs in 90 minutes followed by an oral interview.

ORAL INTERVIEW

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

Examples of frequently asked questions and / or exercises

The exercises, examples of mid-term exams / final exams assignments are available on Studium (studium.unict.it) or on the MS Teams channel of the course.
VERSIONE IN ITALIANO