Word Locator
 All Classes Files Functions Variables Typedefs
Public Member Functions | List of all members
ArrayList Class Reference

An implementation of Java ArrayList. More...

#include <wl.h>

Public Member Functions

 ArrayList ()
 Constructor of ArrayList. More...
 
 ~ArrayList ()
 Destructor of ArrayList. More...
 
void add (int pos)
 Add an integer into the arary. More...
 
int get (int n)
 get the nth pos More...
 
void print ()
 

Detailed Description

An implementation of Java ArrayList.

This implementation has only add and get method. That's enough for this project.

Constructor & Destructor Documentation

ArrayList::ArrayList ( )

Constructor of ArrayList.

Initialized the capacity as 1.

ArrayList::~ArrayList ( )

Destructor of ArrayList.

Delete the allocated array.

Member Function Documentation

void ArrayList::add ( int  pos)

Add an integer into the arary.

Parameters
pos- new integer pos
int ArrayList::get ( int  n)

get the nth pos

Parameters
n- index of request the integer
Returns
The value of the nth integer
void ArrayList::print ( )

The documentation for this class was generated from the following file: