C++ Programming Methods 2018-2019

Important dates

Feb 22 deadline assignment 1
March 22 deadline assignment 2
March 25 midterm exam
April 19 deadline assignment 3
May 25 deadline assignment 4
May 27 final exam
July 4 exam retake


In this course we learn to use the programming language C++ to solve various programming problems. The course builds on content of the “Objectgeoriënteerd Programmeren” and “Datastructuren” courses but these are not required to start with this course. We will be concerned with most important elements of C++ and us these to solve programming assignments. Students are expected to study selected chapters from the book on their own. Programming is learned through practice, therefore we spend a large part of this course working on assignments. Two written exams (half-way and at the end) will determine your grade.

See the StudiewijzerC++ for additional information.


Absolute C++ by Walter Savtich, International edition, 5th edition.

Reading guide, we advice to read 1 chapter each week in this order:

  • Ch.1 C++ basics
  • Ch.2 Flow of Control
  • Ch.3 Function Basics
  • Ch.4 Parameters and Overloading
  • Ch.12 Streams and File I/O
  • Ch.5 Arrays
  • Ch.6 Structures and Classes
  • Ch.7 Constructors and Other Tools
  • Ch.8 Operator Overloading, Friends, and References
  • Ch.9 Strings
  • Ch.10 Pointers and Dynamic Arrays
  • Ch.11 Separate Compilation and Namespaces
  • Ch.14 Inheritance
  • Ch.15 Polymorphism and Virtual Functions


See Datanose for the schedule. During the labs (werkcolleges) feedback will be given on previous assignment and there is opportunity to ask questions on the current assignment or on material in the book. In order to track progress it is required to attend 1 lab every 2 weeks (except for the week with only 1 lab). In case you are unable to attend we would like to be notified beforehand.

Tools and environment

For this course we recommend using the operating system Ubuntu 18.04 or higher with compiler g++ 7.3 or higher. However, you are free to use any you like as long as your source code is portable. To make it portable do not use headers or libraries specific to your platform (no #include <windows.h>), these will not help much with the assignments anyway. If you stick to what is described in the book you will be fine.

We recommend using an Integrated Development Environment (IDE) to help you write and debug your code. Pick whichever you like best, a small (random) selection from the many options is:

Visual studio (community edition)


assignment1: Date Problems deadline 22 Februari 23:59hr
assignment2: Simple Compression deadline 22 March 23:59hr
assignment3: Game of Life deadline 19 April 23:59hr
assignment4: Large Number class deadline 24 May 23:59hr

The first assignments are relatively easy when you have experience with programming for example in Java. But with later assignments (especially the last) your experience with other languages won’t help you much.

Assignments are to be uploaded to Canvas before their respective deadline passes. In the event you were not able to finish an assignment we recommend to upload your work at that time with some comments describing your problems. After each deadline passes a “pretty good” solution to the assignment is made public for comparison. Assignments will be evaluated on:

  1. Correctness
    • is tested and does what the assignment specified
  2. Design
    • is not more complex than necessary
    • does not have the same logic at multiple places
    • is decomposed in a logical way in functions and/or classes
  3. Readability
    • uses intuitive names
    • comments are there where they are useful
    • layout is consistent

Each assignment is made individually, however you are encouraged to discuss the design and the way in which you tackle a problem. But it is not allowed to share source code. This could be considered plagiarism and/or fraud and can have severe consequences.


Only when 4 assignments are completed successfully are you allowed to take the final exam. When you fail an assignment an alternative assignment is given to allow you to compensate. The exam consists of questions on the material in the selected chapters of the book. Exams of previous years are available:



This course was originally derived from the Programmeermethoden course at the Leiden University by Walter Kosters. Earlier versions of the assignments were written by Tijmen Blankevoort, Auke Wiggers, Eugenio Bargiacchi and Georgios Methenitis. Earlier years of this course were organised by Arnoud Visser. Previous years can be found here: