This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ion of List
Even the array implementation is not just an
array. We need a way to keep track of how
many elements there are in the List.
An integer variable would do, but if we have
several Lists in one program (VERY
POSSIBLE!) we need several such integers.
THEREFORE... We packaged the integer together with the
array as “private” data variables belonging to
the instantiated object. 9 const int MAX_LIST = 100;
typedef int ItemType;
// constructors, ADT operations
} 10 Create(L)
Size = 0;
// init size
} 11 12 Destroy(L) Length(L)
int listClass::Length( )
View Full Document
This document was uploaded on 03/31/2014 for the course CS 114 at NJIT.
- Spring '09
- Assembly Language