Array-based member function Assignment

An Unsorted Type ADT is to be extended by the addition of function SplitLists, which has the following specifications:

  1. Implement SplitLists as an array-based member function of the Unsorted List ADT.
    void SplitLists(const UnsortedType& list, ItemType item, 
UnsortedType& list1, UnsortedType& list2) 
{ 
ItemType listItem; 
list1.MakeEmpty(); 
list2.MakeEmpty(); 
list.ResetList(); 
while (!list.IsLastItem()) { 
list.GetNextItem(listItem); 
if(listItem > item) 
list2.InsertItem(listItem); 
else 
list1.InsertItem(listItem); 
} 
} 

b. Implement SplitLists as a linked member function of the Unsorted List ADT.

bool IsThere(ItemType item) const; 
bool UnsortedType:: IsThere(itemType item) 
{ 
Bool moreToSearch; 
Int location =0; 
Found = false; 
Moreto Search = (location < length); 
While(moreToSearch && !found) 
{ 
switch(item.ComparedTo(info[location])) 
{ 
Case LESS: 
Case GREATER: location ++; 
moreToSearch = (location< length); 
break; 
} 
} 
Return found; 
} 
Want latest solution of this assignment
AssignmentHippo Features
  • On Time Delivery

    Our motto is deliver assignment on Time. Our Expert writers deliver quality assignments to the students.

  • Plagiarism Free Work

    Get reliable and unique assignments by using our 100% plagiarism-free services.

  • 24 X 7 Live Help

    The experienced team of AssignmentHippo has got your back 24*7. Get connected with our Live Chat support executives to receive instant solutions for your assignment problems.

  • Services For All Subjects

    We can build quality assignments in the subjects you're passionate about. Be it Programming, Engineering, Accounting, Finance and Literature or Law and Marketing we have an expert writer for all.

  • Best Price Guarantee

    Get premium service at a pocket-friendly rate. At AssignmentHippo, we understand the tight budget of students and thus offer our services at highly affordable prices.