Commit 0d0b813d authored by Matthew P. Russell's avatar Matthew P. Russell
Browse files

Update ArrayList.cpp

parent 1296ae45
......@@ -12,8 +12,8 @@
/*
* name: ArrayList default constructor
* arguments: none
* does: initializes the ArrayList
* effects: sets capacity to 10, and size to 0
* returns: none
* does: initializes the ArrayList, sets capacity to 10, and size to 0
*/
ArrayList::ArrayList() {
......@@ -22,8 +22,9 @@ ArrayList::ArrayList() {
/*
* name: ArrayList destructor
* arguments: none
* does: frees memory associated with the ArrayList
* effects: sets size and capacity to 0
* returns: none
* does: frees memory associated with the ArrayList, and sets size and
capacity to 0
*/
ArrayList::~ArrayList() {
......@@ -31,9 +32,9 @@ ArrayList::~ArrayList() {
/*
* name: insert
* arguments: an integer, x
* does: inserts x into the ArrayList
* effects: increases size of ArrayList by 1
* arguments: an integer to insert
* returns: none
* does: inserts x into the ArrayList, and increases size of ArrayList by 1
*/
void ArrayList::insert(int x) {
......@@ -41,9 +42,9 @@ void ArrayList::insert(int x) {
/*
* name: remove
* arguments: an integer, x
* does: removes x from the ArrayList
* effects: decreases size of ArrayList by 1
* arguments: an integer to remove
* returns: none
* does: removes x from the ArrayList, and decreases size of ArrayList by 1
*/
void ArrayList::remove(int x) {
......@@ -51,9 +52,9 @@ void ArrayList::remove(int x) {
/*
* name: find
* arguments: an integer, x
* does: returns true if x is in the ArrayList, false otherwise
* effects: none
* arguments: an integer to find
* returns: returns true if x is in the ArrayList, false otherwise
* does: none
*/
bool ArrayList::find(int x) {
......@@ -62,8 +63,8 @@ bool ArrayList::find(int x) {
/*
* name: numitems
* arguments: none
* does: returns the size of the ArrayList
* effects: none
* returns: returns the size of the ArrayList
* does: none
*/
int ArrayList::numitems() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment