SlideShare a Scribd company logo
(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.pdf
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(Pskip)- skip.pdf
(Pskip)- skip.pdf(Pskip)- skip.pdf
(Pskip)- skip.pdf
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 
(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
aone2010
 

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

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 

(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.