Vector Implementation - Data Structures - Lab 4 | CSCI 1200, Lab Reports of Data Structures and Algorithms

Material Type: Lab; Class: DATA STRUCTURES; Subject: Computer Science; University: Rensselaer Polytechnic Institute; Term: Unknown 1989;

Typology: Lab Reports

Pre 2010

Uploaded on 08/09/2009

koofers-user-nxw
koofers-user-nxw 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Science II CSci 1200
Lab 4
Vector Implementation
Introduction
This lab explores more of the implementation of the vector class. Please
download
http://www.cs.rpi.edu/academics/courses/spring08/cs2/lab04/Vec.h
http://www.cs.rpi.edu/academics/courses/spring08/cs2/lab04/test_vec.cpp
and then turn off all network connections.
Checkpoints
1. Complete the implementation and testing of the push_back and erase
member functions of the Vec<T>. The main function in main_vec.cpp
includes code to do the testing for you.
2. Write the resize member function. Note that you are not allowed to use
push_back in your implementation. Add code to the main program
to test this function. (Hint: apply resize to z a few times.)

Partial preview of the text

Download Vector Implementation - Data Structures - Lab 4 | CSCI 1200 and more Lab Reports Data Structures and Algorithms in PDF only on Docsity!

Computer Science II — CSci 1200

Lab 4

Vector Implementation

Introduction

This lab explores more of the implementation of the vector class. Please download

http://www.cs.rpi.edu/academics/courses/spring08/cs2/lab04/Vec.h http://www.cs.rpi.edu/academics/courses/spring08/cs2/lab04/test_vec.cpp

and then turn off all network connections.

Checkpoints

  1. Complete the implementation and testing of the push_back and erase member functions of the Vec. The main function in main_vec.cpp includes code to do the testing for you.
  2. Write the resize member function. Note that you are not allowed to use push_back in your implementation. Add code to the main program to test this function. (Hint: apply resize to z a few times.)