Corso di Programmazione++, A.A. 2008/09

Nuovo orario lezione di Martedi`: come richiesto da diversi studenti la lezione del martedi` avra` inizio alle 14 (anziche` alle 15) a partire da martedi` 12 maggio.

Orario Lezioni

Orario Ricevimento

  • Lunedi`, 16:30-18:00, Edificio Marconi (Vecchio edificio di Fisica), 2 piano, Stanza 202-A

Materiale del Corso

  • Lezione 01, 16 Mar 2009: Introduzione (pdf), examples
  • Lezione 02, 17 Mar 2009: scope of variables, namespace, arrays, pointers and references (pdf), examples
  • Lezione 03, 23 Mar 2009: More on Pointers. Constants in C++. Functions. Introduction to Classes (pdf), examples
  • Lezione 04, 24 Mar 2009: Classes in C++. Data members and member functions. Constructors. (pdf), examples
  • Lezione 05, 30 Mar 2009: Classes in C++. Separating interface and implementation. Pointers and references to objects (pdf), examples
  • Lab 01, 31 Mar 2009: Application for computing weighted average of data with asymmetric uncertainties (pdf) examples , I/O manipulators, interface of std::vector
  • Lezione 06, 6 Apr 2009: Using Class Constructors. Dynamic memory allocation. Class Destructors. constant member functions. Default arguments for functions. (pdf), examples
  • Lab 02, 7 Apr 2009: Revisit application from previous lab session.

  • Lezione 07, 20 Apr 2009: More on dynamic allocation. Overloading operators as member functions (pdf), examples
  • Lezione 08, 21 Apr 2009: Overloading operators for built-in types and classes. Global function vs. member functions. friend functions. static data and methods (pdf), examples
  • Lezione 09, 27 April 2009: Using ifstream for I/O from file. Arguments for C++ applications. Using external libraries. Using ROOT libraries (pdf),
  • Lab 03, 28 Apr 2009: Revisit application from previous lab session.
    Libraries. g++ options. Arguments for C++ applications.
  • Lab 04, 5 May 2009: Revisit application from previous lab session.
    Use ROOT classes for graphical display: TH1F and TGraphAsymmErrors
  • Lezione 10, 11 May 2009: Operator overloading in a first non trivial class. Example of class Vector (pdf), examples
  • Lab 05, 12 May 2009: Discuss implementations by students.
    Forward declaration to reduce dependencies in header files.
  • Lezione 11, 18 May 2008: Introduction to inheritance. (pdf), examples
  • Lezione 12, 19 May 2009: Inheritance and polymorphism. Virtual functions. abstract classes. (pdf), examples1, examples2
  • Lezione 13, 25 May 2009: dynamic_cast. Enumerators. Midterm exam. (pdf), (midterm)
  • Lab 06, 26 May 2009: Fitting data to functions. Using inheritance and polymorphism. (pdf)
  • Lezione 14, 8 June 2009: Templates and generic programming. Exceptions in C++. (pdf), examples
  • Lab 07, 9 June 2009: polymorphic fitter and fit model objects.
  • Lezione 15, 15 June 2009: More on Templates: friends, static data, and inheritance. Standard Template Library (STL) (pdf), examples
  • Lab 08, 16 June 2009: Finish polymorphic fitter and fit model objects.
  • Lezione 16, 22 Jun 2009: Elements of Unified Modeling Language (UML) (pdf). Elements of Design Pattern: Adapter and Singleton (pdf)
  • Final Exam: consegna entro ore 12:00 di Lunedi` 6 Luglio (pdf)