bool leftTreeProperty(TreeNode* t, KeyedItem k) { return t == NULL || ( t->item.getKey() < k.getKey() && leftTreeProperty(t->leftChildPtr, t->item.getKey()) && rightTreeProperty(t->rightChildPtr, t->item.getKey())); }
bool Merch::getField(KeyedItem& target) const { try { info.searchTreeRetrive(target.getKey(), target); } catch (TreeException e) { cout << "ERROR: Could not find field "; target.getItem()->display(); cout << " in item " << searchKey << endl; return false; // Desired field does not exist in this Merchandise } // end try return true; } // end getField(KeyedItem&)