SlideShare a Scribd company logo
1 of 2
Download to read offline
In this exercise, we are going to finish the implementation of a special type of LinkedList called
a StringList. The purpose of this exercise is to get you comfortable with LinkedList behavior and
manipulations (without having to worry about generic types).
See the attached files: • StringList.cpp • StringList.h
• Shopping.cpp
This is a simple linked list that stores strings. It supports some basic operations.
Your job is to implement all of the unimplemented functions in StringList.cpp, namely:
• voidappend(conststd::string&)
o Appends a new string to the end of the list
• boolcontains(conststd::string&)
o Returns TRUE if string is in list, else returns FALSE
• intsize()
o Returns the number of elements in the list (or 0 if there are none)
• voiddeleteAll()
o Removes all list elements, freeing all dynamically allocated memory
• std::stringget(constint&)
o Returns the string at the location specified
o If the location referenced does not exist, throws an exception
Before getting started on this project, make sure the sample compiles for you and that you can
run it. (it should produce output).
When you have completed your work, it will produce the following:
Solution
for apeend try this
for searching a particular node
{
struct node* current = head; // Initialize current
while (current != NULL)
{
if (current->key == x)
return true;
current = current->next;
}
return false;
}
for size of linked list
for deletion
returns string at specified location
//this is similar to search operation
struct node* current = head; // Initialize current
while (current != NULL)
{
if (current->key == x)
return true;
return x->data;
current = current->next;
}
return false;
}

More Related Content

Similar to In this exercise, we are going to finish the implementation of a spe.pdf

01-intro_stacks.ppt
01-intro_stacks.ppt01-intro_stacks.ppt
01-intro_stacks.pptsoniya555961
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template LibraryIlio Catallo
 
Scala collections api expressivity and brevity upgrade from java
Scala collections api  expressivity and brevity upgrade from javaScala collections api  expressivity and brevity upgrade from java
Scala collections api expressivity and brevity upgrade from javaIndicThreads
 
My lecture stack_queue_operation
My lecture stack_queue_operationMy lecture stack_queue_operation
My lecture stack_queue_operationSenthil Kumar
 
L11 array list
L11 array listL11 array list
L11 array listteach4uin
 
you will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfyou will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfclearvisioneyecareno
 
stacks and queues class 12 in c++
stacks and  queues class 12 in c++stacks and  queues class 12 in c++
stacks and queues class 12 in c++Khushal Mehta
 
Java10 Collections and Information
Java10 Collections and InformationJava10 Collections and Information
Java10 Collections and InformationSoftNutx
 
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxAssg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxfestockton
 
computer notes - Data Structures - 5
computer notes - Data Structures - 5computer notes - Data Structures - 5
computer notes - Data Structures - 5ecomputernotes
 
ObjectivesMore practice with recursion.Practice writing some tem.docx
ObjectivesMore practice with recursion.Practice writing some tem.docxObjectivesMore practice with recursion.Practice writing some tem.docx
ObjectivesMore practice with recursion.Practice writing some tem.docxvannagoforth
 

Similar to In this exercise, we are going to finish the implementation of a spe.pdf (20)

Python Basics
Python BasicsPython Basics
Python Basics
 
01-intro_stacks.ppt
01-intro_stacks.ppt01-intro_stacks.ppt
01-intro_stacks.ppt
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
 
Scala collections api expressivity and brevity upgrade from java
Scala collections api  expressivity and brevity upgrade from javaScala collections api  expressivity and brevity upgrade from java
Scala collections api expressivity and brevity upgrade from java
 
Day2
Day2Day2
Day2
 
My lecture stack_queue_operation
My lecture stack_queue_operationMy lecture stack_queue_operation
My lecture stack_queue_operation
 
L11 array list
L11 array listL11 array list
L11 array list
 
you will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfyou will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdf
 
stacks and queues class 12 in c++
stacks and  queues class 12 in c++stacks and  queues class 12 in c++
stacks and queues class 12 in c++
 
Stack in Sata Structure
Stack in Sata StructureStack in Sata Structure
Stack in Sata Structure
 
Java10 Collections and Information
Java10 Collections and InformationJava10 Collections and Information
Java10 Collections and Information
 
6
66
6
 
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxAssg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Collections
CollectionsCollections
Collections
 
05 c++-strings
05 c++-strings05 c++-strings
05 c++-strings
 
computer notes - Data Structures - 5
computer notes - Data Structures - 5computer notes - Data Structures - 5
computer notes - Data Structures - 5
 
Collections and generics
Collections and genericsCollections and generics
Collections and generics
 
STRINGS IN JAVA
STRINGS IN JAVASTRINGS IN JAVA
STRINGS IN JAVA
 
ObjectivesMore practice with recursion.Practice writing some tem.docx
ObjectivesMore practice with recursion.Practice writing some tem.docxObjectivesMore practice with recursion.Practice writing some tem.docx
ObjectivesMore practice with recursion.Practice writing some tem.docx
 

More from aimdeals045

Infection of bacteria by virus particles is a Poisson process.  Viru.pdf
Infection of bacteria by virus particles is a Poisson process.  Viru.pdfInfection of bacteria by virus particles is a Poisson process.  Viru.pdf
Infection of bacteria by virus particles is a Poisson process.  Viru.pdfaimdeals045
 
inequalityi dont know if the inequality is changing when solving.pdf
inequalityi dont know if the inequality is changing when solving.pdfinequalityi dont know if the inequality is changing when solving.pdf
inequalityi dont know if the inequality is changing when solving.pdfaimdeals045
 
Individuals that continually monitor the financial markets seeking m.pdf
Individuals that continually monitor the financial markets seeking m.pdfIndividuals that continually monitor the financial markets seeking m.pdf
Individuals that continually monitor the financial markets seeking m.pdfaimdeals045
 
indicate whether you agree with the following statement that describ.pdf
indicate whether you agree with the following statement that describ.pdfindicate whether you agree with the following statement that describ.pdf
indicate whether you agree with the following statement that describ.pdfaimdeals045
 
Indicate what data analysis is and why is it useful Think of how a .pdf
Indicate what data analysis is and why is it useful Think of how a .pdfIndicate what data analysis is and why is it useful Think of how a .pdf
Indicate what data analysis is and why is it useful Think of how a .pdfaimdeals045
 
Incompressible substances A and B are placed in a thermal contact in.pdf
Incompressible substances A and B are placed in a thermal contact in.pdfIncompressible substances A and B are placed in a thermal contact in.pdf
Incompressible substances A and B are placed in a thermal contact in.pdfaimdeals045
 
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdf
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdfInch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdf
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdfaimdeals045
 
In-Class Exam Homework The college president is more interested in .pdf
In-Class Exam Homework The college president is more interested in .pdfIn-Class Exam Homework The college president is more interested in .pdf
In-Class Exam Homework The college president is more interested in .pdfaimdeals045
 
Income Statement (in million of USDs)2015Total sales202Cost .pdf
Income Statement (in million of USDs)2015Total sales202Cost .pdfIncome Statement (in million of USDs)2015Total sales202Cost .pdf
Income Statement (in million of USDs)2015Total sales202Cost .pdfaimdeals045
 
In your own words, what were the core intellectual, political, and a.pdf
In your own words, what were the core intellectual, political, and a.pdfIn your own words, what were the core intellectual, political, and a.pdf
In your own words, what were the core intellectual, political, and a.pdfaimdeals045
 
In your opinion, what are the biggest challenges facing MNCSolut.pdf
In your opinion, what are the biggest challenges facing MNCSolut.pdfIn your opinion, what are the biggest challenges facing MNCSolut.pdf
In your opinion, what are the biggest challenges facing MNCSolut.pdfaimdeals045
 
In words, what is the equation for normal stressSolutionA mea.pdf
In words, what is the equation for normal stressSolutionA mea.pdfIn words, what is the equation for normal stressSolutionA mea.pdf
In words, what is the equation for normal stressSolutionA mea.pdfaimdeals045
 
In which of the following remote access methods is a pinholing schem.pdf
In which of the following remote access methods is a pinholing schem.pdfIn which of the following remote access methods is a pinholing schem.pdf
In which of the following remote access methods is a pinholing schem.pdfaimdeals045
 
In what area does internal control allow only one person responsible.pdf
In what area does internal control allow only one person responsible.pdfIn what area does internal control allow only one person responsible.pdf
In what area does internal control allow only one person responsible.pdfaimdeals045
 
In todaySolution n the past it had been the .pdf
In todaySolution                     n the past it had been the .pdfIn todaySolution                     n the past it had been the .pdf
In todaySolution n the past it had been the .pdfaimdeals045
 
In this task, I want you to verify that the phase response of Fourie.pdf
In this task, I want you to verify that the phase response of Fourie.pdfIn this task, I want you to verify that the phase response of Fourie.pdf
In this task, I want you to verify that the phase response of Fourie.pdfaimdeals045
 
In this unit, you discussed some of the problems associated with inf.pdf
In this unit, you discussed some of the problems associated with inf.pdfIn this unit, you discussed some of the problems associated with inf.pdf
In this unit, you discussed some of the problems associated with inf.pdfaimdeals045
 
In this question i know the answer is an elliptic parabolid. My ques.pdf
In this question i know the answer is an elliptic parabolid. My ques.pdfIn this question i know the answer is an elliptic parabolid. My ques.pdf
In this question i know the answer is an elliptic parabolid. My ques.pdfaimdeals045
 
In this chapter a decision tree was developed for John Thompson (Fig.pdf
In this chapter a decision tree was developed for John Thompson (Fig.pdfIn this chapter a decision tree was developed for John Thompson (Fig.pdf
In this chapter a decision tree was developed for John Thompson (Fig.pdfaimdeals045
 
In this problem , I have to find the third derivative of the fourth .pdf
In this problem , I have to find the third derivative of the fourth .pdfIn this problem , I have to find the third derivative of the fourth .pdf
In this problem , I have to find the third derivative of the fourth .pdfaimdeals045
 

More from aimdeals045 (20)

Infection of bacteria by virus particles is a Poisson process.  Viru.pdf
Infection of bacteria by virus particles is a Poisson process.  Viru.pdfInfection of bacteria by virus particles is a Poisson process.  Viru.pdf
Infection of bacteria by virus particles is a Poisson process.  Viru.pdf
 
inequalityi dont know if the inequality is changing when solving.pdf
inequalityi dont know if the inequality is changing when solving.pdfinequalityi dont know if the inequality is changing when solving.pdf
inequalityi dont know if the inequality is changing when solving.pdf
 
Individuals that continually monitor the financial markets seeking m.pdf
Individuals that continually monitor the financial markets seeking m.pdfIndividuals that continually monitor the financial markets seeking m.pdf
Individuals that continually monitor the financial markets seeking m.pdf
 
indicate whether you agree with the following statement that describ.pdf
indicate whether you agree with the following statement that describ.pdfindicate whether you agree with the following statement that describ.pdf
indicate whether you agree with the following statement that describ.pdf
 
Indicate what data analysis is and why is it useful Think of how a .pdf
Indicate what data analysis is and why is it useful Think of how a .pdfIndicate what data analysis is and why is it useful Think of how a .pdf
Indicate what data analysis is and why is it useful Think of how a .pdf
 
Incompressible substances A and B are placed in a thermal contact in.pdf
Incompressible substances A and B are placed in a thermal contact in.pdfIncompressible substances A and B are placed in a thermal contact in.pdf
Incompressible substances A and B are placed in a thermal contact in.pdf
 
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdf
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdfInch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdf
Inch Ltd. was incorporated in the Bahamas in 2011. Although the comp.pdf
 
In-Class Exam Homework The college president is more interested in .pdf
In-Class Exam Homework The college president is more interested in .pdfIn-Class Exam Homework The college president is more interested in .pdf
In-Class Exam Homework The college president is more interested in .pdf
 
Income Statement (in million of USDs)2015Total sales202Cost .pdf
Income Statement (in million of USDs)2015Total sales202Cost .pdfIncome Statement (in million of USDs)2015Total sales202Cost .pdf
Income Statement (in million of USDs)2015Total sales202Cost .pdf
 
In your own words, what were the core intellectual, political, and a.pdf
In your own words, what were the core intellectual, political, and a.pdfIn your own words, what were the core intellectual, political, and a.pdf
In your own words, what were the core intellectual, political, and a.pdf
 
In your opinion, what are the biggest challenges facing MNCSolut.pdf
In your opinion, what are the biggest challenges facing MNCSolut.pdfIn your opinion, what are the biggest challenges facing MNCSolut.pdf
In your opinion, what are the biggest challenges facing MNCSolut.pdf
 
In words, what is the equation for normal stressSolutionA mea.pdf
In words, what is the equation for normal stressSolutionA mea.pdfIn words, what is the equation for normal stressSolutionA mea.pdf
In words, what is the equation for normal stressSolutionA mea.pdf
 
In which of the following remote access methods is a pinholing schem.pdf
In which of the following remote access methods is a pinholing schem.pdfIn which of the following remote access methods is a pinholing schem.pdf
In which of the following remote access methods is a pinholing schem.pdf
 
In what area does internal control allow only one person responsible.pdf
In what area does internal control allow only one person responsible.pdfIn what area does internal control allow only one person responsible.pdf
In what area does internal control allow only one person responsible.pdf
 
In todaySolution n the past it had been the .pdf
In todaySolution                     n the past it had been the .pdfIn todaySolution                     n the past it had been the .pdf
In todaySolution n the past it had been the .pdf
 
In this task, I want you to verify that the phase response of Fourie.pdf
In this task, I want you to verify that the phase response of Fourie.pdfIn this task, I want you to verify that the phase response of Fourie.pdf
In this task, I want you to verify that the phase response of Fourie.pdf
 
In this unit, you discussed some of the problems associated with inf.pdf
In this unit, you discussed some of the problems associated with inf.pdfIn this unit, you discussed some of the problems associated with inf.pdf
In this unit, you discussed some of the problems associated with inf.pdf
 
In this question i know the answer is an elliptic parabolid. My ques.pdf
In this question i know the answer is an elliptic parabolid. My ques.pdfIn this question i know the answer is an elliptic parabolid. My ques.pdf
In this question i know the answer is an elliptic parabolid. My ques.pdf
 
In this chapter a decision tree was developed for John Thompson (Fig.pdf
In this chapter a decision tree was developed for John Thompson (Fig.pdfIn this chapter a decision tree was developed for John Thompson (Fig.pdf
In this chapter a decision tree was developed for John Thompson (Fig.pdf
 
In this problem , I have to find the third derivative of the fourth .pdf
In this problem , I have to find the third derivative of the fourth .pdfIn this problem , I have to find the third derivative of the fourth .pdf
In this problem , I have to find the third derivative of the fourth .pdf
 

Recently uploaded

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 

Recently uploaded (20)

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

In this exercise, we are going to finish the implementation of a spe.pdf

  • 1. In this exercise, we are going to finish the implementation of a special type of LinkedList called a StringList. The purpose of this exercise is to get you comfortable with LinkedList behavior and manipulations (without having to worry about generic types). See the attached files: • StringList.cpp • StringList.h • Shopping.cpp This is a simple linked list that stores strings. It supports some basic operations. Your job is to implement all of the unimplemented functions in StringList.cpp, namely: • voidappend(conststd::string&) o Appends a new string to the end of the list • boolcontains(conststd::string&) o Returns TRUE if string is in list, else returns FALSE • intsize() o Returns the number of elements in the list (or 0 if there are none) • voiddeleteAll() o Removes all list elements, freeing all dynamically allocated memory • std::stringget(constint&) o Returns the string at the location specified o If the location referenced does not exist, throws an exception Before getting started on this project, make sure the sample compiles for you and that you can run it. (it should produce output). When you have completed your work, it will produce the following: Solution for apeend try this for searching a particular node { struct node* current = head; // Initialize current while (current != NULL) { if (current->key == x) return true; current = current->next; } return false;
  • 2. } for size of linked list for deletion returns string at specified location //this is similar to search operation struct node* current = head; // Initialize current while (current != NULL) { if (current->key == x) return true; return x->data; current = current->next; } return false; }