1: // Created by Frank M. Carrano and Timothy M. Henry.
2: // Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.
4: template<class ItemType>
5: bool SortedListHasA<ItemType>::insertSorted(const ItemType& newEntry)
6: {
7: int newPosition = std::abs(getPosition(newEntry));
8: return listPtr–>insert(newPosition, newEntry);
9: } // end insertSorted