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 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
Write a new lc-3 trap subroutine (i.e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i.e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e.g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e.g. b0000 0000 0000 0111 =
Answers: 3
You know the right answer?
Use the file names listed below since your file will have the following components:
ch16_ex5_...
Questions
question
Social Studies, 19.02.2021 23:40
question
Chemistry, 19.02.2021 23:40
question
History, 19.02.2021 23:40
question
Mathematics, 19.02.2021 23:40
question
Mathematics, 19.02.2021 23:40
question
Mathematics, 19.02.2021 23:40
Questions on the website: 13722361