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, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
question
Computers and Technology, 24.06.2019 18:30
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How do i copy and paste equations and pictures like math graphs, to post on this site to get my questions answered?
Answers: 2
You know the right answer?
Use the file names listed below since your file will have the following components:
ch16_ex5_...
Questions
question
Mathematics, 04.04.2020 23:31
question
Mathematics, 04.04.2020 23:31
question
Mathematics, 04.04.2020 23:32
question
Computers and Technology, 04.04.2020 23:32
question
Chemistry, 04.04.2020 23:32
Questions on the website: 13722362