/BKVector

BKVector is our version of C++ vector class with all the important functionalities implemented in it. We tried to make it similer as much as possible to C++ vector by adding these features.

Primary LanguageC++

BKVector

BKVector is our version of C++ vector class with all the important functionalities implemented in it. We tried to make it similer as much as possible to C++ vector by adding these features.

Features:

  • It is possible to create BKVector objects with all types of C++.
  • Initializing BKVector with the values in the initializer list.
  • Initializing BKVector by taking an array and the size of the array.
  • Accessing item by index using ( [] operator ).
  • Adding item at the BKVector end using ( push_back method ).
  • Deleting item from the BKVector end or clear all the BKVector using ( pop_back and clear methods ).
  • Adding item at the given position ( iterator ) using ( insert method ).
  • Deleting the item at the given position ( iterator ) using ( erase method ).
  • Deleting range of items given by two positions ( start iterator and end iterator ) using ( erase method ).
  • Changing the BKVector size using ( resize method ) and doubling the size if it is needed in ( push_back and insert methods ).
  • Returning the current size and capacity using ( size and capacity methods ).
  • Checking if the BKVector is empty or not using ( empty method ).
  • Comparing two BKVectors using ( <, > and == operators ).
  • Supporting iterators and all their operators ( *, ->, +, -, +=, -=, ++, and -- ).
  • Comparing two iterators using ( <, >, <=, >=, == and != operators ).
  • Using output stream with BKVector objects.
  • Throwing exceptions in case of entering out of range index or invalid iterator.
  • Supports all C++ algorithms (sort, reverse, ...etc).

More Details About the Course:

  • Doctor: Mohammad El-Ramly
  • Course: Object-Oriented Programming - CS213
  • Faculty of Computers and Artificial Intellience - Cairo University

Authors: