a8_m2 - Nat Sci Lab CS II, Module I Jacobs University...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Nat Sci Lab CS II, Module I Course: 320112 Jacobs University Bremen April 11th, 2008 Dr. Heinrich Stamerjohanns . Assignment 8 - Template Containers This assignment must be solved in C++. Your programs should include proper declarations for all the variables needed. Insert suitable comments to explain what your program does. Also pay attention to proper indentation of your code. The TAs are supposed to take points off, if the code is not properly indented. Problem 8.1 Containers, Templates (4 points) Design and implement a generic container class. By using templates your container has to be able to store any type of data. The underlying data structure will be an array. While designing and implementing your class you cannot use of any container coming from the Standard Template Library. Your class should support the following operations (please read all the requirements before starting to code): int insert(int pos, T element) : inserts element in the position pos . When re- quested to insert an element a certain position, and that position is not free, it should not
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

a8_m2 - Nat Sci Lab CS II, Module I Jacobs University...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online