Skip to content

BorkedFork/cst211-data-structures-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CST211 - Data Structures: Array Implementation

Overview

Template-based dynamic array implementation in C++ with custom exception handling and bounds checking.

Course Information

  • Course: CST211 - Data Structures
  • Assignment: Assignment 1 - Array
  • Institution: Oregon Institute of Technology

Features

  • Template-based generic array implementation
  • Custom start index support
  • Bounds checking with exception handling
  • Dynamic memory management
  • Copy constructor and assignment operator overloading
  • Array subscript operator overloading

Technical Details

Array Class

  • Type: Template class supporting generic types
  • Memory Management: Dynamic allocation with proper cleanup
  • Index Handling: Configurable start index (not limited to 0)
  • Exception Safety: Custom exception class for error handling

Key Operations

  • getStartIndex() / setStartIndex(int) - Manage array base index
  • getLength() / setLength(int) - Manage array size
  • operator[] - Bounds-checked element access
  • operator= - Deep copy assignment
  • ReAllocator(int) - Dynamic resizing

Files

  • array.h - Array class template declaration
  • Exception.h / Exception.cpp - Custom exception handling
  • Source.cpp - Test driver and usage examples

Building

This project uses Visual Studio solution files:

# Open in Visual Studio
Array.sln

Learning Objectives

  • Template programming in C++
  • Dynamic memory management
  • Operator overloading
  • Exception handling
  • RAII principles
  • Generic data structure implementation

Technologies

  • C++
  • Visual Studio
  • Template metaprogramming

About

Template-based dynamic array implementation with bounds checking and custom exception handling - CST211 Data Structures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages