refman.pdf - Vectors Lab Lab 2(Revision 1 Generated by...

This preview shows page 1 - 4 out of 6 pages.

Vectors Lab Lab # 2 (Revision 1) Generated by Doxygen 1.8.7 Sun Sep 20 2015 16:05:00
CONTENTS 1 Contents 1 Class Index 1 1.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Class Documentation 1 2.1 DynArray < T > Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2.1.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.3 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1 Class Index 1.1 Class List Here are the classes, structs, unions and interfaces with brief descriptions: DynArray < T > 1 2 Class Documentation 2.1 DynArray < T > Class Reference Inherits RandomAccess, and Iterable < T > . Public Member Functions DynArray (boolean allowNulls) DynArray () DynArray (int ensureCapacity, boolean allow_nulls) DynArray (DynArray < T > other) • void add (T ele) • T remove (int atIndex) • T get (int index) • void set (int index, T object) • int size () • String toString () • boolean equals (Object other) 2.1.1 Detailed Description Special Instructions Copy your existing code into this lab and submit your changes/etc through this Lab only. Generated on Sun Sep 20 2015 16:05:00 for Vectors Lab by Doxygen
2 CONTENTS Do not attempt to submit last week’s lab in place of this one. Submit your changes only by including them in this project/lab and submitting them from within this project/lab. Engineering Change Order(s) Since the initial release, the customer has requested that the implementation of this object be refined. Specifically, the customer requests that the code be revised so as to enforce the following invariant(s): • A DynArray that is constructed to disallow null objects should never allow the storage or retrieval of a null object. • The object overrides, specifically equals and toString must work transparently with DynArray objects irrespective of whether they allow or disallow null objects. • The set() must allow clients to set any permissible object in the array whose index is valid (within the capacity of the structure), and must ensure that the size of the DynArray reflects these changes. For example; creating a DynArray of capacity N should allow clients to set( i, Object ) when i is less than N. Moreover, the size of the underlying DynArray should reflect the total number of object locations used as a result of that operation.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture