PROGRAMMING I
cod. 13464

Academic year 2008/09
1° year of course - Second semester
Professor
Academic discipline
Informatica (INF/01)
Field
Discipline informatiche
Type of training activity
Basic
40 hours
of face-to-face activities
4 credits
hub:
course unit
in - - -

Learning objectives

The course provides the basic instruments and techniques to design and develop simply programs using a sequential, imperative programming language. In particular, the course focuses on an imperative fragment of the C++ language.

Prerequisites

- - -

Course unit content

<p>Problems, instances, algorithms and executors. Representation of algorithms: flow charts, programming languages and programs, pseudo-codes. Syntax and semantics. <br />
Introduction to an imperative subset of the C++ language: data types, values, identifiers, variables, expressions, instructions and functions; input and output. Structure of a program. <br />
Elementary data types: integer and floating point numeric types, boolean types, character types, enumerations; literal constants. Declarations and definitions: variables and initialization; symbolic constants. <br />
Expressions and instructions: assignment, operators, mixed arithmetic and data type conversions; simple and compound instructions, sequences of instructions, conditional and iterative instructions. <br />
Input and output. <br />
Compound data types: arrays, structures and C-style strings. <br />
The procedural abstraction: declaration, definition and use of functions. Parameter passing and return values. Local and global variables: action field and lifecycle. Recursive functions. <br />
Pointers and their arithmetic. <br />
Basics on the data types and functions of the standard library. <br />
Text and binary files via streams. <br />
Program execution: interpreted, compiled and mixed approaches. Programming environments: editors, compilers, linkers, debuggers. The compilation phases. Structuring source codes: inclusion directives. </p>
<p>Use of the imperative fragment of the C++ to code algorithms for: </p>
<ul>
<li>Numeri analysis: solving polynomial equations via bisection, rectangle method to compute definite integrals, convergent series and successive approximations;</li>
<li>Manipulation of vectors in the space; </li>
<li>Creation and processing of BMP images; </li>
<li>Structured data manipulation in CSV and binary formats. </li>
</ul>

Full programme

- - -

Bibliography

<p>The couse has no main textbook. The following are useful references. </p>
<p>References available on the Web: <br />
A. Ficarra, M. Murgia. Il linguaggio di programmazione C++ standard, 2003. <br />
R. Miller, D. Clark, B. White, W. Knottenbel. An Introduction to the Imperative Part of C++, 1999 (in lingua inglese). <br />
B. Eckel. Thinking in C++ (2nd edition), Volumes 1 & 2. <br />
<br />
Reference textbooks: <br />
H.M. Deitel, P.J. Deitel. C++ Fondamenti di programmazione, Apogeo, 2003. <br />
S. Lippman, J. Lajoie. C++: Corso di programmazione, terza edizione, Addison-Wesley, 2000. <br />
P. Marotta. C++: una panoramica sul linguaggio (seconda edizione) <br />
B. Stroustrup. C++: Linguaggio, libreria standard, principi di programmazione, terza edizione, Addison-Wesley, 2000. <br />
</p>

Teaching methods

- - -

Assessment methods and criteria

- - -

Other information

- - -