FOUNDATIONS OF PROGRAMMING

Gennaro PERCANNELLA FOUNDATIONS OF PROGRAMMING

0612800005
DEPARTMENT OF INFORMATION AND ELECTRICAL ENGINEERING AND APPLIED MATHEMATICS
EQF6
INFORMATION ENGINEERING FOR DIGITAL MEDICINE
2024/2025

OBBLIGATORIO
YEAR OF COURSE 1
YEAR OF DIDACTIC SYSTEM 2022
AUTUMN SEMESTER
CFUHOURSACTIVITY
1FONDAMENTI DI PROGRAMMAZIONE
324LESSONS
324EXERCISES
2FONDAMENTI DI PROGRAMMAZIONE
324LESSONS
Objectives
THE COURSE PROVIDES THE BASIC ELEMENTS FOR SOLVING PROBLEMS OF NOT HIGH COMPLEXITY THROUGH THE USE OF COMPUTING SYSTEMS, USING THE FUNDAMENTAL ELEMENTS OF A HIGH-LEVEL PROGRAMMING LANGUAGE.
THE COURSE ALLOWS STUDENTS TO ACQUIRE KNOWLEDGE OF THE FUNDAMENTAL ELEMENTS OF STRUCTURED PROGRAMMING AND OF THE C LANGUAGE, ALONG WITH THE ""PROBLEM SOLVING"" TECHNIQUES THROUGH THE USE OF A COMPUTER.

KNOWLEDGE AND UNDERSTANDING
SYNTAX OF THE C LANGUAGE, ENCODING AND REPRESENTATION OF INFORMATION, FUNDAMENTAL CONSTRUCTS OF HIGH-LEVEL PROGRAMMING LANGUAGES, FUNDAMENTAL DATA STRUCTURES (ARRAYS AND MATRICES), REPRESENTATION OF ALGORITHMS THROUGH BLOCK DIAGRAMS, PHASES OF THE TRANSLATION OF A PROGRAM.

APPLYING KNOWLEDGE AND UNDERSTANDING
DESIGN AN ALGORITHM TO SOLVE PROBLEMS OF NOT HIGH COMPLEXITY. READ AND DESIGN IN THE C LANGUAGE. CODE AN ALGORITHM INTO A C LANGUAGE PROGRAM USING AN INTEGRATED DEVELOPMENT ENVIRONMENT. COMPILE A PROGRAM WRITTEN IN C. IDENTIFY AND RESOLVE COMMON ERRORS.
Prerequisites
THE COURSE ASSUMES NO PROGRAMMING BACKGROUND.
Contents
Didactic unit 1: ALGORITHM, PROGRAM, EXECUTOR
(LECTURE/PRACTICE/LABORATORY Hours 6/2/0)
- 1 (2 Hours Lecture): Concept of algorithm, executor, language, program, process
- 2 (2 Hours Lecture): Representation models of an algorithm: Flow chart. Initial concept of variable, constant, expression
- 3 (2 Hours Lecture): Simple operations (assignment, entry / exit)
- 4 (2 Hours Exercise): Examples of development of simple algorithms (fall of a body, intersection of two lines, ...) and representation by flow chart
KNOWLEDGE AND UNDERSTANDING: Understanding of terms: algorithm, executor, language, program, process
APPLIED KNOWLEDGE AND UNDERSTANDING: Define simple algorithms composed of sequences of instructions using flow-charts

Didactic unit 2: INFORMATION REPRESENTATION
(LECTURE/PRACTICE/LABORATORY Hours 6/2/0)
- 5 (2 Hours Lecture): Information: definition, type, cardinality, representation, coding
- 6 (2 Hours Lecture): Representation of natural numbers; Representation in base 2 and 2 ^ k
- 7 (2 Hours Lecture): Outline of representation of integers in sign and module and complements. Representation of information by enumeration. Character representation. Intervals of representation of types
- 8 (2 Hours Practice): Examples of coding and decoding of numerical information of the types introduced
KNOWLEDGE AND UNDERSTANDING: Understanding the concept of information and information representation and coding
APPLIED KNOWLEDGE AND UNDERSTANDING SKILLS: Knowing how to code generic and non-numerical information, using the introduced representations and coding techniques.

Didactic unit 3: FLOW CONTROL
(Hours Lecture / EXERCISE / WORKSHOP 4/4/0)
- 9 (2 Hours Lecture): Constructs in structured programming. Sequence construct. Selective constructs: if-then, if-then-else, case
- 10 (2 Hours Lecture): Iterative constructs: while, repeat-until, do-while, for. Grafting of constructs
- 11 (2 Hours Exercise): Examples of development of simple algorithms and flow chart representation
- 12 (2 Hours Exercise): Examples of development of simple algorithms and flow chart representation
KNOWLEDGE AND UNDERSTANDING SKILLS: Acquire knowledge related to the fundamental elements of structured programming: selective constructs, sequence constructs and iterative constructs
APPLIED KNOWLEDGE AND UNDERSTANDING: Knowing how to analyze simple problems (which do not use structured data but selective and iterative constructs) and arrive at their design through flow diagrams knowing how to consciously choose the control constructs.

Didactic unit 4: BASIC PROGRAMMING CONCEPTS
(LECTURE/PRACTICE/LABORATORY Hours 10/0/0)
- 13 (2 Hours Lecture): Programming languages. High and low level languages. Translators. Syntax of a language, lexical elements. Concepts of statement, statement, expression. Representation of algorithms and programs
- 14 (2 Hours Lecture): System of types. Simple and structured definition. Simple types. Representation range, operations, precision (for real data types)
- 15 (2 Hours Lecture): Structured types: arrays, outline of structures and files
- 16 (2 Hours Lecture): Operator system: precedence, associativity and overload. Operators and typology: arithmetic, relational, logical operators
- 17 (2 Hours Lecture): Constants and variables (completion). Declarative, simple statements, assignment, expressions
KNOWLEDGE AND UNDERSTANDING: Acquire the concept of high-level language, the concept of translation and translator, the concept of data type and that of operator.
KNOWLEDGE AND UNDERSTANDING APPLIED: Knowing how to use simple and structured types and identify the types to be used in simple problems.

Didactic unit 5: ELEMENTS OF C LANGUAGE
(Hours Lecture / EXERCISE / WORKSHOP 4/4/0)
- 18 (2 Hours Lecture): Elements of C language. Structure of a program. Types and operators. Assignment instructions. Entry and exit instructions
- 19 (2 Hours Lecture): Elements of C language. Selective and iterative control structures. Array structured type.
- 20 (2 Hours Exercise): Coding in C of simple algorithms expressed through flow charts, using an adequate representation of the data through the simple types of C
- 21 (2 Hours Practice): Coding in C of simple algorithms expressed through flow charts, using an adequate representation of the data through simple types and the C array
KNOWLEDGE AND UNDERSTANDING SKILLS: Acquire knowledge relating to the fundamental elements of the C programming language through the use of a computer
APPLIED KNOWLEDGE AND UNDERSTANDING: Knowing how to code in C a simple algorithm already expressed through a flow-chart.

Didactic unit 6: SUBROUTINES
(LECTURE/PRACTICE/LABORATORY Hours 8/4/0)
- 22 (2 Hours Lecture): Subroutines. Functional abstraction. Functions and procedures. Prototypes. Data exchange: input and output parameters
- 23 (2 Hours Lecture): Subroutine environment. Passing parameters. Passing by value and reference.
- 24 (2 Hours Lecture): Structure of the environment (visibility and life time). Contracts, preconditions and post-conditions
- 25 (2 Hours Lecture): Elements of C language. Functions and functions void.
- 26 (2 Hours Practice): Coding in C of simple programs that make use of functions and procedures
- 27 (2 Hours Practice): Coding in C of simple programs that make use of functions and procedures
KNOWLEDGE AND UNDERSTANDING: Understanding of the concept of subroutine, referring to both functions and procedures. Analysis of the two parameter association techniques: by value and by reference.
APPLIED KNOWLEDGE AND UNDERSTANDING: Knowing how to code a program in C through functions and procedures by exchange by value and reference. Knowing how to analyze the effect of simple C programs, understanding the behavior determined by each statement or instruction contained in the program.

Didactic unit 7: ELEMENTARY ALGORITHMS
(LECTURE/PRACTICE/LABORATORY Hours 6/4/0)
- 28 (2 Hours Lecture): Simple Patterns. Basic algorithms on data sequences. Sequence generation
- 29 (2 Hours Lecture): Visit of sequences (with cap and of known length)
- 30 (2 Hours Lecture): Accumulation on a sequence
- 31 (2 Hours Practice): Coding in C of simple programs that make use of functions and procedures with respect to the basic patterns
- 32 (2 Hours Practice): Coding in C of simple programs that make use of functions and procedures with respect to the basic patterns
KNOWLEDGE AND UNDERSTANDING: Understanding of algorithm models (design patterns) for solving problems.
APPLIED KNOWLEDGE AND UNDERSTANDING: Knowing how to solve single problems starting from the patterns for their specialization

Didactic unit 8: SELECTION ALGORITHMS ON DATA SEQUENCES
(LECTURE/PRACTICE/LABORATORY Hours 4/4/0)
- 33 (2 HOUR Lecture): Selection problem. Selecting an element (satisfying a property P in a sequence or vector)
- 34 (2 Hours Lecture): Description of selection patterns in vectors and sequences of various types. Linear research as a case of applying patterns.
- 35 (2 Hours Exercise): Development of selection algorithms in vectors and sequences and related coding in C. (Examples: selection of the minimum, maximum, largest positive, in stored and non-stored vectors and sequences.)
- 36 (2 Hours Exercise): Development of selection algorithms in vectors and sequences and related coding in C. (Examples: selection of the minimum, maximum, largest positive, in stored and non-stored vectors and sequences.)
KNOWLEDGE AND UNDERSTANDING: Description of selection patterns in vectors and sequences of various types.
APPLIED KNOWLEDGE AND UNDERSTANDING SKILLS: Knowing how to develop selection algorithms in C in vectors and sequences of various types.

TOTAL LECTURE/PRACTICE/LABORATORY HOURS 48/24/0
Teaching Methods
THE COURSE IS STRUCTURED AS FOLLOWS: LECTURES (48H), PRACTISE (24H). DURING THE PRACTISE, ALGORITHMS AND THEIR CODING IN C LANGUAGE ARE PROPOSED AND DISCUSSED AND STUDENTS ARE ASKED TO IMPLEMENT SPECIFIC ALGORITHMS IN ORDER TO SOLVE THE PROBLEMS PROPOSED DURING THE LECTURES AND THE PRACTISE. IN ORDER TO PARTICIPATE TO THE FINAL ASSESSMENT AND TO GAIN THE CREDITS CORRESPONDING TO THE COURSE, THE STUDENT MUST HAVE ATTENDED AT LEAST 70% OF THE HOURS OF ASSISTED TEACHING ACTIVITIES.
Verification of learning
LEARNING SKILLS WILL BE CHECKED BY MEANS OF MIDTERM EXAMINATION, WHILE THE FINAL ASSESSMENT CONSISTS IN A WRITTEN AND AN ORAL EXAMINATION. THE FINAL GRADE IS ASSIGNED AS FOLLOWS: MIDTERM EXAM COUNTS FOR 30%, WRITTEN EXAM COUNTS FOR 50%, WHILE ORAL EXAM COUNTS FOR 20%. MIDTERM EXAMINATION CONSISTS IN A MULTIPLE-CHOICE TEST AND TWO OPEN QUESTIONS. WRITTEN EXAMINATION REQUIRES STUDENTS TO SOLVE A PRACTICAL PROBLEM WHOSE SOLUTION INVOLVES DESIGNING, CODING, EXECUTING AND TESTING A PROGRAM IN C LANGUAGE. THE AIM WILL BE TO DEMONSTRATE THE ABILITY TO TRANSFORM A PROBLEM INTO A DESIGN, AND A DESIGN INTO AN OPERATIONAL PROGRAM. ORAL EXAMINATION CONSISTS IN AN ORAL DISCUSSION ABOUT ALL THE ARGUMENTS OF THE COURSE WITH THE AIM TO ASSESS THE LEARNING SKILLS ACHIEVED.
Texts
M. VENTO, FONDAMENTI DI INFORMATICA, APPUNTI DELLE LEZIONI, EDIZIONE 2015.

SUPPLEMENTARY TEACHING MATERIAL WILL BE AVAILABLE ON THE UNIVERSITY E-LEARNING PLATFORM (HTTP://ELEARNING.UNISA.IT) ACCESSIBLE TO STUDENTS USING THEIR OWN UNIVERSITY CREDENTIALS.
More Information
THE COURSE IS HELD IN ITALIAN
Lessons Timetable

  BETA VERSION Data source ESSE3 [Ultima Sincronizzazione: 2024-10-23]