From charlesreid1

Line 12: Line 12:


The top-level base class is the Map interface class, which defines public behaviors that Map objects must expose.
The top-level base class is the Map interface class, which defines public behaviors that Map objects must expose.
The next level down is the Abstract Map class, which defines a few private behaviors and some utility classes.
The SortedArrayMap and UnsortedArrayMap share quite a bit of code and should probably inherit from an ArrayMap base class, but they do not. They fulfill all the requirements of the [[Maps/ADT]] Maps abstract data type.


==Flags==
==Flags==


{{MapsFlag}}
{{MapsFlag}}

Revision as of 07:20, 26 June 2017

Notes

This page describes the application of object oriented principles to the Maps / Dictionaries data type.

  • Start by describing the inheritance diagram
  • Then describe the use of OOP principles - comparators, iterables, and encapsulation
  • Composition design pattern for utility classes
  • How to use binary search to find keys in an ArrayList containing composite objects

Inheritance Diagram

MapsInheritanceDiagram.png

The top-level base class is the Map interface class, which defines public behaviors that Map objects must expose.

The next level down is the Abstract Map class, which defines a few private behaviors and some utility classes.

The SortedArrayMap and UnsortedArrayMap share quite a bit of code and should probably inherit from an ArrayMap base class, but they do not. They fulfill all the requirements of the Maps/ADT Maps abstract data type.

Flags