Skip to main content
ICT
Lesson A15 - ArrayList
 
Main Previous Next
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

A. ArrayList Implementation of a List page 3 of 11

  1. A data structure combines data organization with methods of accessing and manipulating the data. For example, an ArrayList is a data structure for storing a list of elements and provides methods to find, insert, and remove an element. At a very abstract level, we can describe a general “list” object. A list contains a number of elements arranged in sequence. We can find a target value in a list, add elements to the list, remove elements from the list and process each element of the list.

  2. An abstract description of a data structure, with the emphasis on its properties, functionality, and use, rather than on a particular implementation, is referred to as an Abstract Data Type (ADT). An ADT defines methods for handling an abstract data organization without the details of implementation.

  3. A “list” ADT, for example, may be described as follows:

    Data organization:
    - Contains a number of data elements arranged in a linear sequence

    Methods:
    - Create an empty List
    - Append an element to List
    - Remove the i-th element from List
    - Obtain the value of the i-th element
    - Traverse List (process or print out all elements in sequence, visiting each element once)

  4. An ArrayList object contains an array of object references plus many methods for managing that array. The most convenient feature of an ArrayList is that you can keep adding elements to it no matter what size it was originally. The size of the ArrayList will automatically increase and no information will be lost.

 

Main Previous Next
Contact
 © ICT 2006, All Rights Reserved.