Diego Casadei's C/C++ programming course

Last update for this page: Sun Apr 5 19:28:28 2009

About this web site

Contact (edit!)

WebCounter: counter.digits.com/wc/diego-casadei since Dec 1999.
contacts since 26 Nov. 2001.

Material for my C/C++ course at the University of Bologna might still be found on its original location.

Course contents

(Last update: 7 Apr 2006)

Part 1: Structured programming

  • Introduction
    • Programming paradigms
    • The C and C++ languages
    • "Hello world!" in C and C++
  • C++ syntax
    • C++ standard types
    • Keywords
    • Variables and scope
    • Namespaces
    • const
    • typedef, enum
    • sizeof()
    • Conversion rules
    • Casting in C++
    • Escape sequences, strings
    • Costants
    • Arrays
    • Pointers
    • Operators
    • Mathematical functions
    • Assignments
    • Statements
    • Control structures
    • Functions
    • I/O
  • Dynamic memory allocation
  • Organizing files
  • Exercises

Part 2: Object oriented programming

  • Object oriented programming
    • Classes and objects
    • Methods
    • OOP
    • Constructors and destructors
    • Inheritance
    • Setters and getters
    • Operator overloading
    • this, friend
    • Virtual functions
    • Abstract classes
    • static
    • Singletons
    • Arrays of objects
  • Strings in C and C++
  • Generic programming
    • Template class
    • Template functions
    • Templates of templates
  • The ISO/ANSI C++ standard libraries
  • Standard Template Library
    • Streams
    • Containers
    • Iterators
    • Algorithms
  • Application: pseudo-random generators
  • Exercises


Part 3: Software development. Introduction to UML

  • The cycle of s/w development
  • Use cases
  • Actors identification
  • Interfaces specification
  • Divide et impera
  • Testing
  • Class relations
    • Association
    • Inheritance
    • Aggregation
    • Composition
    • Design patterns
  • UML diagrams
    • Sequence diagram
    • Communication diagram
    • Activity diagram
    • State machine diagram
    • Deployment diagram
    • Package diagram

Part 4: Introduction to algorithms and data structures

  • Introduction
    • Algorithms
    • Computing models
    • Asymptotic notation
    • Analysis methods
    • Fibonacci numbers
  • Data structures
    • LIFO
    • FIFO
    • deque
    • map
    • list
    • tree
  • Sorting
    • SelectionSort
    • InsertionSort
    • BubbleSort
    • MergeSort
    • HeapSort
    • QuickSort
  • Finding elements
    • Binary search tree
    • AVL tree


Part 5: The Standard Template Library

  • Introduction
  • Containers and iterators
    • Sequence containers
    • Sorted associative containers
    • Input and output iterators
    • Forward iterators
    • Bidirectional iterators
    • Random access iterators
  • Generic algorithms
    • Function objects as parameters
    • Mutating and non mutating sequence algorithms
    • Strict total and weak ordering
    • Searching and sorting
    • Lexicographical comparison
    • Permutation generators
    • Numerical algorithms
  • Function objects
  • Adaptors
    • Function adaptors
    • Container adaptors
    • Iterator adaptors
  • Using the STL

Appendices

  • Dynamic libraries
  • Monte Carlo Methods
  • Random numbers
  • Makefile
  • GDB
  • CVS



Bibliography

The suggested references are labelled with the target level, scoring from beginner (*) to advanced (***).

Programming

Level
References
*
C. Horstmann, Computing Concepts with C++ Essentials, 3rd ed. (web site).  Trad. it. Fondamenti di C++, McGraw-Hill, 2003 (web.it).
**
S. Lippman, J. Lajole, C++ Primer, 3rd ed. , Addison Wesley, 1998 (web site). Trad. it.: C++ - Corso di programmazione, Terza edizione (web.it).
**
B.W. Kernighan, D.M. Ritchie, The C Programming Language, Prentice-Hall 1988 (web site).  Trad. it.: Linguaggio C, Jackson.
***
B. Eckel, Thinking in C++,  2nd ed. http://www.bruceeckel.com, http://www.planetpdf.com.
***
S. Meyers, Effective C++,  2nd ed. (1997) and More Effective C++ (1996), Addison Wesley.  Both in Effective C++ CD.
**
W.H. Press et al., Numerical Recipes in C, 2nd ed.  (2002), Cambridge University Press, http://www.library.cornell.edu/nr/bookcpdf.html.  There is also a C++ version.
**
Grady Booch, Object-Oriented Analysis and Design with Applications, 2nd edition, Addison-Wesley, 1994 (web site).
**
M. Fowler, UML distilled, 3rd ed.,  Addison-Wesley, 2004 (web site, web.it).
**
E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns, Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995 (CD web site, web.it).
**
C. Demetrescu, I. Finocchi, G. Italiano, Algoritmi e strutture dati, McGraw-Hill, 2004 (web.it).
**
C. Ghezzi, M. Jazayeri, and D. Mandrioli, Fundamentals of Software Engineering, 2nd ed., Pearson Prentice-Hall, 2003 (web site).  Trad. it. Ingegneria del software, 2004 (web.it).
**
D.R. Musser, G.J. Derge, A. Saini, STL Tutorial and Reference Guide, 2nd ed., Addison-Wesley, 2001 (web site).
***
Scott Meyers, Effective STL.  50 Specific Ways to Improve Your Use of the Standard Template Library, Addison-Wesley, 2001 (web site).
*P. Tosoratti, Introduzione all'informatica, Casa Editrice Ambrosiana, 1998 (web.it).
**
P. Ancilotti, M. Boari, A. Ciampolini, G. Lipari, Sistemi operativi, McGraw-Hill, 2004 (web.it).

Data analysis

LevelReferences
**F. James, Monte Carlo theory and practice, Rep. Prog. Phys., Vol. 43 (1980), 1145 (PDF).
***G. Cowan, Statistical data anasysis, Clarendon Press, Oxford, 1998 (Glen's course).
***G. D'Agostini, Bayesian reasoning in data anasysis.  A critical introduction, World Scientific, 2003.
***C.P. Robert, The Bayesian Choice, 2nd ed., Springer, 2001.
***G. Casella, C.P. Robert, Monte Carlo Statistical Methods, 2nd ed., Springer, 2005.

Links

Programming courses

Data analysis courses

Misc