81784 - PROGRAMMAZIONE PER LA FISICA

Academic Year 2018/2019

  • Docente: Graziano Servizi
  • Credits: 6
  • SSD: FIS/01
  • Language: Italian
  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: First cycle degree programme (L) in Physics (cod. 9244)

Learning outcomes

This course would give to students a knowledge of C++ programming language sufficient to face and solve simple problems in Physics through computer programs. In particular the student would become able to perform any operation of data reading and writing, both in text and binary formats, and to use them according to all necessities involved in carrying on physical experiments.

Course contents

Internal data representations in a computer: ranges and precision.

C++ types suitable for representing data: plain types and class types.

Stucture of a C++ program: functions, classes and the main function.

Functions arguments: taking an argument by value or by reference.

Homogeneous data containers: arrays and pointers.

Statements to control the execution flow.

All C++ operators: their precedence and associativity rules.

Input/Output operations.

struct and class: the object oriented programming model.

Constructors and operators for class types, including input/output operators.

Inheritance and virtuality: pointers and references to ancestor classes.

Rvalues reference and the move semantic.

Managing exceptions.

template functions and classes.

Template deduction of argument types for a template function.

Template variadic functions and classes: etherogeneous data containers.

Topics in multithreading.

Readings/Bibliography

Huge and free documentation available at website

http://www.physycom.unibo.it/labinfo

(written in italian: just a good chance to learn it)

Alternatively any good handbook on C++ language, available in any book store and in the Department Library.


Teaching methods

Lectures (in italian speech) and training in laboratory (mandatory)

Assessment methods

Written and oral exam, with presentation of what was done during the laboratory sessions

Teaching tools

The teacher himself.

Office hours

See the website of Graziano Servizi