->Homepage
->Schedule
->Courses
-->CS182
-->CS183
-->CS285
-->Tentative Schedule
-->Objectives
-->Homework
-->Quiz 1
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
-->Lab 6
->STL Help
->Book Errata
->Course Policies
->Electronic Submission
->Documentation Standards
->Old Exams
->C++ Examples
->MSVC++ Info
->Software
->Support Forum
->Unix Info
->Nature Photos

[Home]
[Rich][Home][Rich]
[Author]
CS285 -- Lab 1: Roll Your Own Vector Class

Winter 2003-2004

Each student should complete this lab individually.
Objectives Addressed

No course objectives are addressed by this assignment. It's purpose is to serve as a prerequisite assessment.

Procedure

Implement your own version of the templated std::vector. You class should be called vector and should be wrapped in a namespace called cs285. Your class should implement the constructor (with up to two parameters), copy constructor, destructor, assignment operator, and the following member functions:

  • empty
  • push_back
  • pop_back
  • operator[] -- both const and non-const versions
  • operator==
  • operator!=
  • resize -- with up to two parameters
  • size

This class will be used in future lab projects.

Interim Activity Log (due 11:00pm, the day prior to week 2 lab)

You should submit an activity log to indicate your activity and progress on this assignment during the first week.

Lab report (due 11:00pm, the day prior to week 3 lab)

Here is a template file to use as a starting point for this report.

Your lab report need not be self-contained. Your report should include:

  • Your reaction (a couple of paragraphs on what you learned and what you thought about while working on this assignment, including the most surprising thing that you forgot since you last programmed, and had to relearn to do this assignment)
  • Any suggestions you have for how the lab assignment could be improved.
  • A summary of your activity log indicating how much time you spent on the assignment (following the template provided in the lab1.xml template document). Please use the following categories:
    • Project setup
    • Group design/coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Documentation
    • Other
  • Results from a test program that calls each function at least once.
  • The Documented source code for your program.

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

Acknowledgment

This laboratory was developed by Dr. Chris Taylor.

Last Updated: Monday, 01-Dec-2003 08:55:06 CST