<p class=\"NL\">Implement the following specification of UnsortedType using a ci
ID: 3638163 • Letter: #
Question
<p class="NL">Implement the following specification of UnsortedType using a circular linked list as the implementation structure.</p><p class="CP"> </p>
<p class="CP">template<class ItemType></p>
<p class="CP">structNodeType;</p>
<p class="CP"> </p>
<p class="cp0">/* Assumption:  ItemType is a type for which the operators</p>
<p class="cp0">"<" and "==" are defined—either an appropriate built-in type or a class that overloads these operators. */</p>
<p class="CP"> </p>
<p class="CP">template<class ItemType></p>
<p class="CP">classUnsortedType</p>
<p class="CP">{</p>
<p class="CP">public:</p>
<p class="CP">  // Class constructor, destructor, and copy constructor</p>
<p class="CP">UnsortedType();</p>
<p class="CP">  ~UnsortedType();</p>
<p class="CP">UnsortedType(constUnsortedType<ItemType>&);</p>
<p class="CP"> </p>
<p class="CP">void operator=(UnsortedType<ItemType>);</p>
<p class="CP"> </p>
<p class="CP">boolIsFull() const;</p>
<p class="CP">  // Determines whether list is full.</p>
<p class="CP">  // Post: Function value = (list is full)</p>
<p class="CP"> </p>
<p class="CP">intGetLength() const;</p>
<p class="CP">  // Determines the number of elements in list.</p>
<p class="CP">  // Post: Function value = number of elements in list.</p>
<p class="CP"> </p>
<p class="CP">voidRetrieveItem(ItemType& item, bool& found);</p>
<p class="CP">  // Retrieves list element whose key matches item's key</p>
<p class="CP">  // (if present).</p>
<p class="CP">  // Pre:  Key member of item is initialized.</p>
<p class="CP">  // Post: If there is an element someItem whose key matches </p>
<p class="CP">  //     item's key, then found = true and item is a copy of</p>
<p class="CP">  //     someItem; otherwise found = false and item is</p>
<p class="CP">  //     unchanged.</p>
<p class="CP">  //     List is unchanged.</p>
<p class="CP"> </p>
<p class="CP"> </p>
<p class="CP">voidInsertItem(ItemType item);</p>
<p class="CP">  // Adds item to list.</p>
<p class="CP">  // Pre:  List is not full.</p>
<p class="CP">  //       item is not in list.</p>
<p class="CP">  // Post: item is in list.</p>
<p class="CP"> </p>
<p class="CP">voidDeleteItem(ItemType item);</p>
<p class="CP">  // Deletes the element whose key matches item's key.</p>
<p class="CP">  // Pre:  Key member of item is initialized.</p>
<p class="CP">  //       One and only one element in list has a key matching</p>
<p class="CP">  //       item's key.</p>
<p class="CP">  // Post: No element in list has a key matching item's key.</p>
<p class="CP"> </p>
<p class="CP">voidResetList();</p>
<p class="CP">  // Initializes current position for an iteration through the</p>
<p class="CP">  // list.  </p>
<p class="CP">  // Post: Current position is prior to list.</p>
<p class="CP"> </p>
<p class="CP">voidGetNextItem(ItemType&);</p>
<p class="CP">  // Gets the next element in list.</p>
<p class="CP">  // Pre:  Current position is defined.</p>
<p class="CP">  //       Element at current position is not last in list.</p>
<p class="CP">  // Post: Current position is updated to next position.</p>
<p class="CP">  //       item is a copy of element at current position.</p>
<p class="CP"> </p>
<p class="CP">private:</p>
<p class="CP">NodeType<ItemType>* listData;</p>
<p class="CP">int length;</p>
<p class="CP">NodeType<ItemType>* currentPos;</p>
<p class="CP">};</p>
<h2>Deliverables</h2>
<ul>
<li>A listing of the specification and implementation files for UnsortedType</li>
<li>A listing of the driver program for your test plan</li>
<li>A listing of the test plan as input to the driver.</li>
<li>A listing of the output from the driver.</li>
</ul>
<p> </p>
<p></p>