Question: Given the class specification of Unsorted Type as below: class UnsortedType Ilan array-based list . public: UnsortedType(): /I Constructor void MakeEmpty(); II Function: Returns the

 Given the class specification of Unsorted Type as below: class UnsortedType
Ilan array-based list . public: UnsortedType(): /I Constructor void MakeEmpty(); II Function:
Returns the list to the empty state. bool IsFull() const, II Function:

Given the class specification of Unsorted Type as below: class UnsortedType Ilan array-based list . public: UnsortedType(): /I Constructor void MakeEmpty(); II Function: Returns the list to the empty state. bool IsFull() const, II Function: Determines whether list is full. int GetLength ( ) const, II Function: returns the number of elements in list. void Retrieveltem(ItemType \& item, bool\& found); /I Function: Retrieves list element whose key matches itern's key (if II present). void Insertltem(IternType item); II Function: Adds item to the end of list. void Deleteltem(ItemType item): /I Function: Deletes the element whose key matches item's key. void GetNextitem(ItemType\& item); // Function: Gets the next element in list. private: int length; // number of elements in the list ItemType info[MAX ITEMS]; // array to store the elements int currentPos; // the position of current element under consideration Assume the class Item Type is defined as class item Type \{ public: ItemType()://constructor int GetValue(); //retum value void Print()://display value void Initialize(int number), ///set value to number private: int value; //key of the item 3 ) (3pts) define(write the code for) function Insertitem(ItemType item) ) (5pts) Follow the comments to complete the client code below(i.e. fill the blanks with your code): t main() (1). I//declare an object of UnsortedType and Ilname it as myList ItemType item1; (2) Jlinsert your code here to add item1 lito the myList (3) display the length of myList (4). check the myList is full or not (5). /ldelete the item1 in myList return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!