FUNDAMENTALS OF PROGRAMMING A - FUNDAMENTALS OF PROGRAMMING B
cod. 1000753

Academic year 2012/13
1° year of course - First semester
Professor responsible for the course unit
Gianfranco ROSSI
integrated course unit
12 credits
hub: PARMA
course unit
in - - -

Course unit structured in the following modules:

Learning objectives

The two courses (with a single integrated final exam) aim at providing both theoretical and practical foundations of imperative programming as well as 'object-oriented' programming, using C++ as the reference programming language.

Prerequisites

No

Course unit content

Programming foundations. Imperative and object-oriented programming. C++ programming language.

Full programme

FOUNDAMENTALS OF PROGRAMMING A.
Problems and algorithms: basic notions, flow-charts -
Programming languages.
A sample program in C++ - Constants and variables -
Elementary data types in C++ - Assignment and compound
statement - Basic input/output - Operators and expressions -
Control structures (selection, iteration).
Structured stratements in C++ - Data structures (abstract vs.
concrete). Arrays in C++. Matrices. Strings. 'struct'.
Tables (hints) - The 'typedef' declaration.

Subprograms: motivations. Function declaration and
call in C++ - Parameter passing: by value, by reference.
'void' functions - Recursive functions - Scope rules in C++.
Local vs. global declarations - File management in C++.

Program development. Programming environment: editor,
compiler, linker (hints) - Developing simple programs using
the imperative part of C++ - Using library functions.

FOUNDAMENTALS OF PROGRAMMING B.
Class and object declaration. Accessing member
functions and data of a class - Class constructors -
A sample class: 'rational' - Function and operator overloading -
The 'string' class - Pointers and dynamic memory allocation.
Arrays and pointers - A sample class: 'int_vett' - The assignment
operator. The copy constructor. Class destructors - Object
life-time (hints) - Abstract data types (ADT).

Exception handling: motivations. Constructs for exception
handling in C++ - Parametric classes ('template'): declaration,
instantiation. A sample class: 'vett<T>' - Parametric functions
(hints) - Inheritance. 'public' vs 'private' derivation.
Multiple inheritance (hints).

Bibliography

L.J. Aguilar. Fondamenti di programmazione in C++ , McGraw-Hill, 2008.

Teaching methods

Theory supported by exercises and practical experimentation.

Assessment methods and criteria

Written and oral exam, plus development and demo of a practical application written in C++.

Other information

Web site: http://www.math.unipr.it/~gianfr/Teaching/FondProgr/index.html

2030 agenda goals for sustainable development

- - -