C++ Programming Methods 2015-2016


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. At the end a written exam 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 (finished Feb 7)
  • Ch.2 Flow of control (finished Feb 14)
  • Ch.3 Function Basics (finished Feb 22)
  • Ch.4 Parameters and overloading (finished Feb 28)
  • Ch.12 Streams and File I/O (finished March 6)
  • Ch.5 Arrays (finished March 13)
  • Ch.6 Structures and Classes (finished March 20)
  • Ch.7 Constructors and other tools (finished March 27)
  • Ch.9 Strings (finished April 3)
  • Ch.10 Pointers and Dynamic Arrays (finished April 10)
  • Ch.11 Separate Compilation and Namespaces (finished April 17)
  • Ch.14 Inheritance (finished April 24)
  • Ch.15 Polymorphism and Virtual Functions (finished May 1)


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 12.04 or higher with compiler g++ 4.7 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 C++ language features introduced after 1998 or libraries specific to your platform, 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:



assignment1: Date Problems, deadline Feb 28 23:59hr
assignment2: Simple Compression, deadline March 20 23:59hr
assignment3: Game of Life, deadline April 17 23:59hr
assignment4: Large Number class, deadline May 15 23:59hr

Assignments are to be uploaded to Blackboard 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 “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 understandable 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 or copy 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 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.