Question
I have this header file and I need the implementation for several functions: retrieve, merge and isSubset. Thank you. class OrderedList : public List {
I have this header file and I need the implementation for several functions: retrieve, merge and isSubset. Thank you.
class OrderedList : public List
{
public:
static const int DEFAULT_MAX_LIST_SIZE = 10;
// Constructor
OrderedList ( int maxNumber = DEFAULT_MAX_LIST_SIZE );
// Modified (or new) list manipulation operations
virtual void insert ( const DataType &newDataItem ) throw ( logic_error );
virtual void replace ( const DataType &newDataItem ) throw ( logic_error );
bool retrieve ( const KeyType& searchKey, DataType &searchDataItem );
// Output the list structure -- used in testing/debugging
void showStructure () const;
// In-lab operations
void merge ( const OrderedList
bool isSubset ( const OrderedList
// Inheritance using templates is somewhat ugly in C++. It feels like you
// should be able to access base class member functions and data without the
// scope resolution operator. Sadly, you cannot when using templates.
// See http://www.parashift.com/c++-faq-lite/templates.html#faq-35.19
// Tell compiler to use these base class methods.
using List
using List
using List
using List
using List
using List
using List
using List
private:
// Locates an element (or where it should be) based on its key
bool binarySearch ( KeyType searchKey, int &index );
{
// Tell compiler to use these base class data members
using List
using List
using List
using List
};
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started