It's time to take our best shot at a design. The design will be our deliverable for the coding team (phase).

💡 Tip -- Designing and coding are both iterative (and may go back and fourth between the two).

This page describes the design that will be coded.

BST Object Diagram
Design Notes:
  • The BST required instance methods are specified by the Dictionary ADT
  • We give the size component the name "_size" because we need to code a "size" method (a name collision on "size" would be problematic in some languages)
BST
  |
  +------- root ------- a BSTNode
  |
  +------- sortFct ------- a function used for inserting/sorting
  |
  +------- searchFct ------- a function used for searching
  |
  +------- _size -- an integer
BSTNode Object Diagram
Coder has choice to add ivar "balanceFactor" for balancing the tree.
BSTNode
  |
  +------- data ------- type varies
  |
  +------- leftNode ------- a BSTNode
  |
  +------- rightNode ------- a BSTNode