A C++ implementation of a dynamic array (ArrayList) with automatic resizing. This project was created as a homework assignment for CST 238 at CSUMB.
double type| Method | Description |
|---|---|
add(double) |
Append element to the end |
insert(int, double) |
Insert element at any index |
remove(int) |
Remove element at index |
clear() |
Delete all elements |
contains(double) |
Check if value exists |
empty() |
Check if list is empty |
size() |
Get number of elements |
get(int) |
Get element at index |
getCapacity() |
Get current capacity |
getResizes() |
Get number of resizes |
getShiftedElements() |
Get number of shifted elements |
make
Or compile manually:
g++ -o arraylist main.cpp ArrayList.cpp List.cpp
./arraylist
ArrayList/
├── ArrayList.h - ArrayList class declaration
├── ArrayList.cpp - ArrayList implementation
├── List.h - List interface
├── List.cpp - List implementation
├── main.cpp - Test program
└── Makefile - Build configuration