subject

Use the file names listed below since your file will have the following components:
ch16_ex5_mainprogram. cpp - given file
//22 34 56 4 19 2 89 90 0 14 32 88 125 56 11 43 55 -999
#include
#include "unorderedlinkedlist. h"
using namespace std;
int main()
{
unorderedlinkedlist list, sublist;
int num;
cout < < "enter numbers ending with -999" < < endl;
cin > > num;
while (num ! = -999)
{
list. insertlast(num);
cin > > num;
}
cout < < endl;
cout < < "list: ";
list. print();
cout < < endl;
cout < < "length of the list: " < < list. length() < < endl;
list. dividemid(sublist);
cout < < "lists after splitting list" < < endl;
cout < < "list: ";
list. print();
cout < < endl;
cout < < "length of the list: " < < list. length() < < endl;
cout < < "sublist: ";
sublist. print();
cout < < endl;
cout < < "length of sublist: " < < sublist. length() < < endl;
system("pause");
return 0;
}
linkedlist. h
unorderedlinkedlist. h
dividing a linked list into two sublists of almost equal sizes:
add the operation dividemid to the class linkedlisttype as follows:
void dividemid(linkedlisttype & sublist);
//this operation divides the given list into two sublists
//of (almost) equal sizes.
//postcondition: first points to the first node and last
// points to the last node of the first
// sublist.
// sublist. first points to the first node
// and sublist. last points to the last node
// of the second sublist.
consider the following statements:
unorderedlinkedlist mylist;
unorderedlinkedlist sublist;
suppose mylist points to the list with elements 34 65 27 89 12 (in this order). the statement:
mylist. dividemid(sublist);
divides mylist into two sublists: mylist points to the list with the elements 34 65 27, and sublist points to the sublist with the elements 89 12.
write the definition of the function template to implement the operation dividemid. also, write a program to test your function.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Dave has to create animations for a game. which tool can dave use?
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
question
Computers and Technology, 24.06.2019 08:20
Evaluate the scenario below and indicate how to handle the matter appropriately. situation: michael received an e-mail from what he thought was his doctor’s office, requesting his social security number. since he had just been in to see his doctor last week, he replied to the e-mail with his social security number.
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
Alison is having a hard time at work because hee inbox is flooded with emails every day. some of these emails are unsolicited. some of other she don’t need. which action should she take to better manager her emails?
Answers: 1
You know the right answer?
Use the file names listed below since your file will have the following components:
ch16_ex5_...
Questions
question
Mathematics, 14.01.2020 15:31
question
Mathematics, 14.01.2020 15:31
question
Mathematics, 14.01.2020 15:31
Questions on the website: 13722361