This assignment will help you get accustomed to the C++ STL linked list class std::list. You may need to do a bit of research to complete a few of these activities. Please email your instructor if you have trouble and need assistance moving forward. You will need the following include files to complete the work below: • • Please complete the following activities: • Create a function called PrintList() that will print out all the elements of a list in a space-separated manner . Use this function to prove you have correctly completed your activities! • Create list a which is initialized to 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 • Create list b which is initialized to 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 . Reverse list b • Create list k which initializes with a copy of every element of a, using the copy constructor • Create list m which initializes with a copy of every element of b, using iterators of b • Merge list m into list k • Remove all duplicates of consecutive elements from k • Create list d which initializes with a copy of every element of a, using the copy constructor • Create list c which initializes with a copy of every element of b, using iterators of b • Create list e as a list of 7 elements all initialized to 9 • Create list of which uses a loop to set up the list into the squares of the first 30 numbers o 1, 4, 9, 25, 36, 49, 64, 81, 100, ... • Use std::stable_partition() and std::erase() to eliminate all odd values from linked list f • Create list h which uses a loop to initialize the list to the squares of the first 50 numbers o 1, 4, 9, 25, 36, 49, 64, 81, 100, .. • "Customize" and create your own custom STL std::sort() operation to sort first by even/odd status, and then sort values high to low . All even numbers move to the left of the list . All odd numbers move to the right of the list . Even grouping is sorted from high to low ■ Odd grouping is sorted from high to low • Find a way to use std::erase() to eliminate all odd values from linked list h

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question

In C++ Programming Language & Give me the answer in Visual Studio Please!!!

 

This assignment will help you get accustomed to the C++ STL linked list class std::list.
You may need to do a bit of research to complete a few of these activities.
Please email your instructor if you have trouble and need assistance moving forward.
You will need the following include files to complete the work below:
<algorithm>
• <iostream>
• <list>
Please complete the following activities:
• Create a function called PrintList() that will print out all the elements of a list in a space-separated manner
• Use this function to prove you have correctly completed your activities!
• Create list a which is initialized to 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
• Create list b which is initialized to 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
• Reverse list b
• Create list k which initializes with a copy of every element of a, using the copy constructor
• Create list m which initializes with a copy of every element of b, using iterators of b
• Merge list m into list k
• Remove all duplicates of consecutive elements from k
• Create list d which initializes with a copy of every element of a, using the copy constructor
• Create list c which initializes with a copy of every element of b, using iterators of b
• Create list e as a list of 7 elements all initialized to 9
• Create list of which uses a loop to set up the list into the squares of the first 30 numbers
o 1, 4, 9, 25, 36, 49, 64, 81, 100, ...
• Use std::stable_partition() and std::erase() to eliminate all odd values from linked list f
• Create list h which uses a loop to initialize the list to the squares of the first 50 numbers
o 1, 4, 9, 25, 36, 49, 64, 81, 100, ...
• "Customize" and create your own custom STL std::sort() operation to sort first by even/odd status, and then sort values high to low
■ All even numbers move to the left of the list
. All odd numbers move to the right of the list
■ Even grouping is sorted from high to low
■ Odd grouping is sorted from high to low
• Find a way to use std::erase() to eliminate all odd values from linked list h
Transcribed Image Text:This assignment will help you get accustomed to the C++ STL linked list class std::list. You may need to do a bit of research to complete a few of these activities. Please email your instructor if you have trouble and need assistance moving forward. You will need the following include files to complete the work below: <algorithm> • <iostream> • <list> Please complete the following activities: • Create a function called PrintList() that will print out all the elements of a list in a space-separated manner • Use this function to prove you have correctly completed your activities! • Create list a which is initialized to 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 • Create list b which is initialized to 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 • Reverse list b • Create list k which initializes with a copy of every element of a, using the copy constructor • Create list m which initializes with a copy of every element of b, using iterators of b • Merge list m into list k • Remove all duplicates of consecutive elements from k • Create list d which initializes with a copy of every element of a, using the copy constructor • Create list c which initializes with a copy of every element of b, using iterators of b • Create list e as a list of 7 elements all initialized to 9 • Create list of which uses a loop to set up the list into the squares of the first 30 numbers o 1, 4, 9, 25, 36, 49, 64, 81, 100, ... • Use std::stable_partition() and std::erase() to eliminate all odd values from linked list f • Create list h which uses a loop to initialize the list to the squares of the first 50 numbers o 1, 4, 9, 25, 36, 49, 64, 81, 100, ... • "Customize" and create your own custom STL std::sort() operation to sort first by even/odd status, and then sort values high to low ■ All even numbers move to the left of the list . All odd numbers move to the right of the list ■ Even grouping is sorted from high to low ■ Odd grouping is sorted from high to low • Find a way to use std::erase() to eliminate all odd values from linked list h
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr