Informatik für D-MAVT - FS 19

Course catalog: 252-0832-00L
Lecturers: Hermann Lehner, Malte Schwerhoff

Primary educational objective is to learn programming with C++. After having successfully attended the course, students have a good command of the mechanisms to construct a program. They know the fundamental control and data structures and understand how an algorithmic problem is mapped to a computer program. They have an idea of what happens "behind the scenes" when a program is translated and executed. Secondary goals are an algorithmic computational thinking, understanding the possibilities and limits of programming and to impart the way of thinking like a computer scientist.

The course covers fundamental data types, expressions and statements, (limits of) computer arithmetic, control statements, functions, arrays, structural types and pointers. The part on object orientation deals with classes, inheritance and polymorphism; simple dynamic data types are introduced as examples. In general, the concepts provided in the course are motivated and illustrated with algorithms and applications.

Date Message

The exam solution is now available.


Bonus exercise 3 (Binary Search Tree) is available. Good luck!


Bonus exercise 2 (Sudoku) is available. And best of all, only 1XP required to unlock it ;) Good luck!


Bonus exercise 1 (Tic-Tac-Toe) is available. Good luck!


Registration to the exercise sessions is open:

Register now on [code]expert

Welcome to Informatik für D-MAVT! Registrations for the exercise sessions will open next Monday morning on Friday evening. In the meanwhile, you can join our Slack channel that will be the hub for all informal communications of general interest. Please join using the following Slack Channel Invitation.

This is a plan. No plan survives contact with reality. We will constantly update lecture material before the lectures.

Week Date Topic Lecture Additional Material Exercises P Prerequisites to unlock bonus exercises B Bonus exercises
1 21.02 Introduction - Integer Arithmetic and its Limits Organizational Things
Reading Material: Introduction Lecture
Handout DE ❘ EN
Integer Arithmetic Lecture
Handout DE ❘ EN
Lecture Examples
Summary 01 | 02
Organisational Information
C++ Tutorial
[code]expert How-To
2 28.02 Boolean Functions, Safe Programming, Control Flow I Lecture
Handout DE ❘ EN
Lecture Examples
Ausdruckswert (Clicker)
Ariane 5 Video ❘ Details
Summary 03
Exercise 2
3 07.03 Control Flow II, Floating Point I Lecture
Handout DE ❘ EN
Lecture Examples
For-Loop (Clicker)
Summary 04
Exercise 3 Tic-tac-toe
4 14.03 Floating Point II, Functions I Lecture
Handout DE ❘ EN
Lecture Examples
IEEE-754 Converter
Summary 05
Exercise 4
Comparing Floating Points
Floating Point Guidelines
Self-Assessment I (Moodle)
Self-Assessment I (PDF) - Solution
5 21.05 Functions II, Reference Types I Lecture
Handout DE ❘ EN
Lecture Examples
Summary 06
Exercise 5
Function Exercise 1 | 2
Stepwise refinement
6 28.03 Reference Types II, Vectors and Strings I Lecture
Handout DE ❘ EN
Lecture Examples
Referenzen (Clicker)
Summary 07
Exercise 6
Additional exercises: Floating Points
Self-Assessment II (Moodle)
Self-Assessment II (PDF) - Solution
7 04.04 Vectors and Strings II, Recursion I Lecture
Handout DE ❘ EN
Lecture Examples
ShortestPath (Clicker)
Rekursion I (Clicker)
Summary 08
Exercise 7
Towers of Hanoi | ENG
8 11.04 Recursion II, Structs and Overloading Lecture
Handout DE ❘ EN
Code Examples
Rekursion III (Clicker)
nice BNF explanation (German) Summary 09
Exercise 8
9 18.04 Structs, Encapsulation and Classes Lecture
Handout DE ❘ EN
Code Examples
EBNF (Clicker)
Summary 10
Exercise 9
Binary Search Tree
02.05 Self-Assessment 3 (Kein neues Material) Self-Assessment III (Moodle)
Note: no exercise sessions on Tuesday, April 30th and Wednesday, May 1st
10 09.05 Dynamic Data Types and Pointers Lecture
Handout DE ❘ EN
Code Examples
Additional Pointer Slides
Pointers I (Clicker)
Summary 11
Exercise 10
Binary Search Tree
11 16.05 Iterators and Containers Lecture
Handout DE ❘ EN
Code Examples
Recursive Structs (Clicker)
Summary 12
Exercise 11
12 23.05 Memory Management with Classes Lecture
Handout DE ❘ EN
Code Examples

Registration for the exercise session

Registration for the exercise sessions will open on Monday, Feb 25th.

Time and place

The following exercise sessions are offered:

Time Place Assistant
Tue 14-16IFW A 32.1Simon Zimmermann
Wed 13-15ETZ H 91Michael Szalai
Wed 13-15ETZ G 91Benjamin Rothenberger
Wed 13-15ETZ K 91Jean-Pierre Smith (EN)
Wed 13-15IFW A 32.1Leonhard Helminger
Wed 13-15HG D 7.1Floor Verhoeven (EN)
Wed 13-15ML F 34Niels Gleining
Wed 13-15ML J 34.1Enis Ulqinaku (EN)
Wed 15-17ML J 37.1Jing Yang (EN)
Wed 15-17ML H 41.1Yifan Wang (EN)
Wed 15-17ETZ K 91Tiziano De Matteis (EN)
Wed 13-15HG D 7.2Vincenz Münger
Wed 13-15IFW C 31Luzian Bieri
Wed 13-15LEE D 101Linus Gloor
Wed 13-15LEE D 105Nicola Burger
Wed 13-15NO D 11Stéphane Luginbühl
Wed 13-15ML H 41.1Malczyk Grzegorz
Wed 13-15ML H 43Ladina Roffler
Wed 13-15ML J 37.1Ian Boschung
Wed 13-15NO E 39Lucas Neubauer
Wed 15-17HG D 7.2Gian Müller
Wed 15-17IFW C 31Lina Gehri
Wed 15-17NO E 39Josefine Leuenberger
Wed 15-17LEE D 101Rakhym Annabayev

Assistants marked with EN teach in English, all others in German.

Backoffice assistants

Role Assistant Notes
Head TAMarco Ancona (EN)Main contact for administrative questions
BackofficeRafael Wampfler-
BackofficeKim Byungsoo (EN)-

Old exam

The exam will take place on Monday, August 19th, 16:00-17:30 (exam duration: 90 minutes).
Here are some old exams for you to understand what to expect in terms of structure and length. Notice that the lecture content has slightly changed since previous years. The exams for Informatik I (D-ITET) and Informatik (D-MAVT) will be the same, so you can take both as reference.

Bonus exercises

There will be 3 bonus exercises during the semester (see the agenda above for the schedule). By solving these exercises you will get up to 0.25 grade points added on top of your exam grade. In order to access the bonus exercises you need to unlock them in Code Expert by solving assignments from previous weeks and earning sufficiently many experience points (XP).


To facilitate the introduction to the lecture, especially for beginners in programming, we will provide an introductory tutorial, which can be completed autonomously. We strongly recommend to complete it in the first week of the semester.

C++ Tutorial Öffnen

Hint: The tutorial is available in both German and English. You can switch the language any time.

Bjarne Stroustrup: Einführung in die Programmierung mit C++, Pearson Studium, 2010 | Also available online from the ETH Domain

Stephen Prata, C++ Primer Plus, Sixth Edition, Addison Wesley, 2012

Andrew Koenig and Barbara E. Moo: Accelerated C++, Addison-Wesley, 2000.


Prof. Dr. Bernd Gärtner and Dr. Michael Hoffmann kindly provided a script (lecture notes) that covers the material presented in the lecture.

Other useful resources