Array-based member function Assignment

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

Submit Your Assignment Here

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.

24 X 7 Live Help

Get connected 24*7 with our Live Chat support executives to receive instant solutions for your assignment.

Services For All Subjects

Get Help with all the subjects like: Programming, Accounting, Finance, Engineering, Law and Marketing.

Best Price Guarantee

Get premium service at a pocket-friendly rate at AssignmentHippo

FREE RESOURCES

  • Assignment Writing Guide
  • Essay Writing Guide
  • Dissertation Writing Guide
  • Research Paper Writing Guide

FREE SAMPLE FILE

  • Accounts
  • Computer Science
  • Economics
  • Engineering

Client Review

I was struggling so hard to complete my marketing assignment on brand development when I decided to finally reach to the experts of this portal. They certainly deliver perfect consistency and the desired format. The content prepared by the experts of this platform was simply amazing. I definitely owe my grades to them.

Tap to Chat
Get instant assignment help