SlideShare a Scribd company logo
1 of 1
Download to read offline
(In C++) Code a singly linked list where each node includes 3 different data types: A country
(string), its capital (string), and its total population (int). Additionally, create two methods to 1)
add a new country at the front of the list and 2) remove a country at the front of the list. Create
the class and use it to add new countries, their capitals, and populations to the list. The addition
of data ends when the user inputs an empty string. Once it ends, break the list down into two
parts with one being for the countries at the even positions and the other being at the odd
positions. Print the lists.

More Related Content

More from aone2010

(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdfaone2010
 
(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdfaone2010
 
(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdfaone2010
 
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdfaone2010
 
(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdfaone2010
 
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdfaone2010
 
(C++) Write a car rental application- Things that you need to impleme.pdf
(C++) Write a car rental application-  Things that you need to impleme.pdf(C++) Write a car rental application-  Things that you need to impleme.pdf
(C++) Write a car rental application- Things that you need to impleme.pdfaone2010
 
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdfaone2010
 
(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdfaone2010
 
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdfaone2010
 
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdfaone2010
 
(PE12-7) Create a Windows application that has the functionality of.pdf
(PE12-7) Create a Windows application that has    the functionality of.pdf(PE12-7) Create a Windows application that has    the functionality of.pdf
(PE12-7) Create a Windows application that has the functionality of.pdfaone2010
 
(Pskip)- skip.pdf
(Pskip)- skip.pdf(Pskip)- skip.pdf
(Pskip)- skip.pdfaone2010
 
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdfaone2010
 
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdfaone2010
 
(Maximum and minimum) Implement the following functions that find the.pdf
(Maximum and minimum) Implement the following functions that find the.pdf(Maximum and minimum) Implement the following functions that find the.pdf
(Maximum and minimum) Implement the following functions that find the.pdfaone2010
 
(Multiple choice) Given the following class definition- class employee.pdf
(Multiple choice) Given the following class definition- class employee.pdf(Multiple choice) Given the following class definition- class employee.pdf
(Multiple choice) Given the following class definition- class employee.pdfaone2010
 
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdfaone2010
 
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdfaone2010
 
(i) Multiple answers- Multiple answers are accepted for this question.pdf
(i) Multiple answers- Multiple answers are accepted for this question.pdf(i) Multiple answers- Multiple answers are accepted for this question.pdf
(i) Multiple answers- Multiple answers are accepted for this question.pdfaone2010
 

More from aone2010 (20)

(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
(I) A randots dample of boemser (i- millinss of deliand paid by lurge.pdf
 
(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf(Hint- use induction on the sequence of operations- check the proof of.pdf
(Hint- use induction on the sequence of operations- check the proof of.pdf
 
(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf(Explain)(1) cconomic equality is one of the most important characteri.pdf
(Explain)(1) cconomic equality is one of the most important characteri.pdf
 
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
(Fill in the blank) Patterns are the behavior- derived from the relati.pdf
 
(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf(e) P(0-76z0-54) (f) P(z-3).pdf
(e) P(0-76z0-54) (f) P(z-3).pdf
 
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
(c) The SOP form of a function is f(a-b-c)-m(0-1)- Give the POS of its.pdf
 
(C++) Write a car rental application- Things that you need to impleme.pdf
(C++) Write a car rental application-  Things that you need to impleme.pdf(C++) Write a car rental application-  Things that you need to impleme.pdf
(C++) Write a car rental application- Things that you need to impleme.pdf
 
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
(DuPont analysis)Triangular Chemicals has total assets of $ 97 million.pdf
 
(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf(d) Click the icon to view the data table (Type an integer or a decima.pdf
(d) Click the icon to view the data table (Type an integer or a decima.pdf
 
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
(c) Suppose events A and B partition a sample space S- where A and B h (1).pdf
 
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
(Preparing a balance sheet) Prepare a balance sheet from the informati.pdf
 
(PE12-7) Create a Windows application that has the functionality of.pdf
(PE12-7) Create a Windows application that has    the functionality of.pdf(PE12-7) Create a Windows application that has    the functionality of.pdf
(PE12-7) Create a Windows application that has the functionality of.pdf
 
(Pskip)- skip.pdf
(Pskip)- skip.pdf(Pskip)- skip.pdf
(Pskip)- skip.pdf
 
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf
(Josephus Problem) In the Josephus problem from antiquity- n people ar.pdf
 
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf
(b) The POS form of a function is f(a-b-c-d)-M(0-7-9)- Give its SOP in.pdf
 
(Maximum and minimum) Implement the following functions that find the.pdf
(Maximum and minimum) Implement the following functions that find the.pdf(Maximum and minimum) Implement the following functions that find the.pdf
(Maximum and minimum) Implement the following functions that find the.pdf
 
(Multiple choice) Given the following class definition- class employee.pdf
(Multiple choice) Given the following class definition- class employee.pdf(Multiple choice) Given the following class definition- class employee.pdf
(Multiple choice) Given the following class definition- class employee.pdf
 
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf
(i- (Click the icon to view the transactions-) Requirements 1- Journal.pdf
 
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf
(ii) dx3d3y+3(dxdy)3+2dxdy-0 (iv) dx3d3y-0.pdf
 
(i) Multiple answers- Multiple answers are accepted for this question.pdf
(i) Multiple answers- Multiple answers are accepted for this question.pdf(i) Multiple answers- Multiple answers are accepted for this question.pdf
(i) Multiple answers- Multiple answers are accepted for this question.pdf
 

Recently uploaded

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 

Recently uploaded (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 

(In C++) Code a singly linked list where each node includes 3 differen.pdf

  • 1. (In C++) Code a singly linked list where each node includes 3 different data types: A country (string), its capital (string), and its total population (int). Additionally, create two methods to 1) add a new country at the front of the list and 2) remove a country at the front of the list. Create the class and use it to add new countries, their capitals, and populations to the list. The addition of data ends when the user inputs an empty string. Once it ends, break the list down into two parts with one being for the countries at the even positions and the other being at the odd positions. Print the lists.