Week 11 - Monday, October 30, 2006 to Friday, November 3, 2006
Templates and the Standard Template Library

Comments

     Templates are a feature added to C++ in the 1990's, about a decade after the release of the original C++.  They have turned out to be very popular, particularly in conjunction with the Standard Template Library.  They are similar to Inheritance, important as a concept, but in practice you will use templates much more than you will write or design templates.  Like Inheritance, their primary importance has been in code libraries.  Also like Inheritance (particularly multiple inheritance, which we have not studied because it has generally given more problems than benefits), the C++ implementation of templates is very complicated, with many subtleties if you want to master them.  Also, there is some questionable syntax choices in C++'s implementation of templates.  Because the complexities of C++ templates are not really related to important Computer Science concepts, and they are primarily of interest to code library designers, we will not study templates in depth.  We will study them primarily to understand how to use the Standard Template Library, which is important for general C++ programmers, and is an implementation of important Computer Science data structures.

    Interestingly, both Java and C# rejected templates at first.  However, the concept is so useful that both have recently implemented them, Java in Version 5.0 and C# in Version 2.  Their implementations however are significantly simpler in syntax from C++, and include some important new concepts gained from C++'s experience with templates.

 

Course Content

    Week 11
    Templates
    The Standard Template Library

 

Readings

Deitel and Deitel Fifth Edition, ??.

Deitel and Deitel Fourth Edition: Chapter 11.1 - 11.4, 21.1, 22.4


Lab Assignment

     Since you will be using the Standard Template Library with Project 4, there will be no lab assignment this week.  
 

Week 11 Test 

    12 Questions for 4 points, with fractions rounded up on the course content web pages listed above.

   This test will be combined with the Week 12 test, and will given on Friday, November 10th.

  

 

Back to Csc 125 Programming in C++
  Scott Badman   Office: B132   Phone: 353-2250   sbadman@parkland.edu  

Parkland College, 2400 W. Bradley Avenue, Champaign, IL 61821