Software Development with C++ Templates       


Thomas Gschwind photo

Software Development with C++ Templates - overview

Software Development with C++ Templates (BINF4213)


  • Uploaded checklist for the lab submission; if possible please fill and print out; if not, you can fill it out before your submission (January 11)
  • Due to popular demand, there will be another lab submission approx one week after the first submission. HOWEVER, this requires that those students who wish to make use of this option to coordinate finding such a date. I suggest that those students discuss this before/after the exam and suggest a date to me shortly after the exam. (January 3)
  • Doodle for lab submission two is available. Some colleagues indicated that they will not be able to submit on January 12. To accomodate these students I will be available for another submission. This date is to be suggested by the students during the last lecture. (December 21)
  • Uploaded the exercises for submission two and uploaded slides for lecture 10 (December 21)
  • Uploaded slides for lecture 9 (December 7)
  • Uploaded slides for lecture 8 (December 1)
  • Uploaded updated slides for lecture 7 (November 28)
  • Uploaded slides for lecture 7 (November 16)
  • Uploaded slides for lecture 6 and updated lecture schedule (November 9)
  • Uploaded checklist for the lab submission; if possible please fill and print out; if not, you can fill it out before your submission (November 2)
  • A new version of the exercises for submission one has been uploaded. A previous version not including the exercises from lecture 5 claimed to be complete. Due to this, my mistake (sorry), exercises 5.1, 5.2, and 5.3 may alternatively be submitted as part of the second lab submission. (October 28)
  • The registration doodle for the lab submission is open (October 24)
  • Uploaded complete set of exercises for the first lab submission (October 19)
  • Uploaded slides for lecture 5 (October 19)
  • Uploaded new slides for lecture 4 with last exercise filled in (October 19)
  • Exercises available as separate document including interfaces for Connect 4 (October 10)
  • Uploaded slides for lecture 3 (October 5)
  • Updated lecture schedule: starting 5 mins earlier and cancelled lecture (October 5)
  • Uploaded slides for lecture 2 (September 28)
  • Uploaded new slides for lecture 1 with corrected lecture times, corrections to exercises (September 28)
  • First Draft of Web Page (September 21)

About the Lecture

The C++ programming language is used in industry as well as in open source projects. The application developed with C++ range from embedded systems solution to client- server-applications in distributed systems, and the implementation of entire desktop environments such as KDE. In many of these systems, C++ coexists nicely with scripting languages which are frequently used for configuration tasks.

The focus of this lecture is to show how C++ templates can be used for advanced software engineering. Before introducing C++ templates, however, the lecture gives an introduction to C++ for those students who are not already familiar with C++. The lecture will cover among others operator overloading, exception handling, templates, and C++'s Standard Library which makes heavy use of templates.

The importance of templates (or also referred to as generics) has also been realized by other programming language designers. For instance, they have been introduced into the Java programming languages (since JSDK~1.5) despite the fact that Java developers originally thought they would not be necessary as well as the C# programming language.

The goal of this lecture is to discuss all the features of the C++ programming language so that it may be used safely. To get a hands-on experience, these features will be illustrated with small programming exercises that will have to be solved by students during the course of the lecture.


Date Time Room Remarks
Sep.22 8:00--9:45 BIN-2.A.10 Administrative Issues, Introduction, Standard Library (Input/Output, Strings, Containers, Iterators) [.pdf]
Sep.29 8:10--9:45 BIN-2.A.10 Classes, Templates [.pdf]
Oct.6 8:10--9:45 BIN-2.A.10 Templates II, Standard Library II [.pdf]
Oct.13 8:05--9:45 BIN-2.A.10 Separate Compilation, Templates III [.pdf]
Oct.20 8:05--9:45 BIN-2.A.10 Memory Management, Classes (Fallacies and Pitfalls) [.pdf]
Oct.27 8:05--9:45 BIN-2.A.10 Memory Management, Classes (Fallacies and Pitfalls) (cont'd from previous lecture)
Nov.3 8:05--12:00 BIN-2.A.10 Submission of excersises (lectures 1 to 5)
Nov.10 8:05--9:45 BIN-2.A.10 Exercise Discussion, Inheritance [.pdf]
Nov.17 8:05--9:45 BIN-2.A.10 Liskov Substitution Principle, Exception Handling [.pdf]
Nov.24 8:05--9:45 BIN-2.A.10 No lecture
Dec.1 8:05--9:45 BIN-2.A.10 Factories in C++, C++11 Language and Libraryr Extensions (initializer_lists, lambda functions, auto, rvalue references, regular expressions, ...) [.pdf]
Dec.8 8:05--9:45 BIN-2.A.10 Standard Library III (Input and Output), Meta-Programming with templates, constexpr, and variadic templates [.pdf]
Dec.15 8:05--9:45 BIN-2.A.10 No lecture
Dec.22 8:05--9:45 BIN-2.A.10 Concepts, Expression Templates, Repetitorium [.pdf]
Jan.12 8:15--9:45 TBD (BIN-2.A.10?) Written Exam
Afterwards, Submission (lectures 5 to 10)

Excersises and Exam

The exercises given at the end of each exam are to be presented in a personal lab submission in the middle and at the end of the lecture. Exercises should be solved in groups of two.   On request, groups of three or one may be permitted.  In case of groups of three, a higher standard is expected from the solution. Even if exercises are solved in groups, any member of the group has to be able to explain all exercises. If you are unable to submit your lab exercise on the regular submission day, you may upon prior request submit your exercise, the week before after the lecture.

The exam will be at the end of the lecture.  The exam will consist of both theoretical exercises and practical exercises.  The latter in the form of small programs to be written or completed.  No materials are allowed during the exam.  However, the lecturer may, to a certain degree, be consulted for API-related questions.