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
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
Related questions
Question
In C++
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F512544bc-c1a5-4d1b-bee2-4cf91e82f54f%2F9d522fac-330d-40ff-9c22-435c4149b895%2Foqsr3so_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr