SlideShare a Scribd company logo
1 of 1
Download to read offline
need it in c++
Task 2: Reuse the Task 1 and create 2 linkedlists L1 and L2, with data elements mentioned below.
L1={1,3,5,7}// contains odd numbers L2={2,4,6,8}// contains even numbers Write a function
mergeLists to merge the elements of L2 with L1 in such a way that the resultant list L1 should look
like the one below: L1={1,2,3,4,5,6,7,8} Task 3: In doubly LL, each node of a linked list will have a
data item which will represent the record of an employee. Following Table shows the list of
Employee; Each emp is list contain 5 attributes of Employee. The data items form a linear
structure in which list data items follow one after the other, from the beginning of the list to its end.
The ordering of the data items is determined by when and where each data item is inserted into
the list and is not a function of the data contained in the list data items. At any point in time, one
data item in any nonempty list is marked using the list's cursor. You travel through the list using
operations that change the position of the cursor. Your class must provide implementation for the
following - Constructor to create empty list - Copy Constructor to copy all elements of linked list -
IsEmpty to check if there is no data element in the list. It returns true if a list is empty. Otherwise,
returns false - Insert function to insert employee. If the list is not empty, then inserts emp at the
end - Search function to search employee - Remove function to remove the data item whose
employee id matched the parameter id Foundation for Advancement of science and Technology
National University of Computer & Emerging Sciences (NUCES), School of Computing -
UpdateSalary function which locate the data item whose employee id matches the parameter id,
then update the respective data item salary member with the parameter salary - MaximumSalary
function which searches for the employee having maximum salary - A function to print the data of
linked list

More Related Content

Similar to need it in c++ Task 2 Reuse the Task 1 and create 2 linkedl.pdf

هياكلبيانات
هياكلبياناتهياكلبيانات
هياكلبيانات
Rafal Edward
 
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
poblettesedanoree498
 
Linked List Objective The purpose of this exercise is to cr.pdf
Linked List Objective The purpose of this exercise is to cr.pdfLinked List Objective The purpose of this exercise is to cr.pdf
Linked List Objective The purpose of this exercise is to cr.pdf
adityacomputers001
 
Ch 1 intriductions
Ch 1 intriductionsCh 1 intriductions
Ch 1 intriductions
irshad17
 
Objective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdfObjective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdf
advancethchnologies
 
Objective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdfObjective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdf
giriraj65
 
In the rest of this lab, you will help build such a list class. The .pdf
In the rest of this lab, you will help build such a list class. The .pdfIn the rest of this lab, you will help build such a list class. The .pdf
In the rest of this lab, you will help build such a list class. The .pdf
SANDEEPARIHANT
 
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docxAssg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
festockton
 

Similar to need it in c++ Task 2 Reuse the Task 1 and create 2 linkedl.pdf (20)

هياكلبيانات
هياكلبياناتهياكلبيانات
هياكلبيانات
 
Adt of lists
Adt of listsAdt of lists
Adt of lists
 
General Data structures
General Data structuresGeneral Data structures
General Data structures
 
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
–PLS write program in c++ thanxLinked List Sorting and Reversing.pdf
 
UNITIII LDS.pdf
UNITIII LDS.pdfUNITIII LDS.pdf
UNITIII LDS.pdf
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
unit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdfunit-ids17-180709051413-1.pdf
unit-ids17-180709051413-1.pdf
 
DS UNIT 1.pdf
DS UNIT 1.pdfDS UNIT 1.pdf
DS UNIT 1.pdf
 
DS UNIT 1.pdf
DS UNIT 1.pdfDS UNIT 1.pdf
DS UNIT 1.pdf
 
Linked List Objective The purpose of this exercise is to cr.pdf
Linked List Objective The purpose of this exercise is to cr.pdfLinked List Objective The purpose of this exercise is to cr.pdf
Linked List Objective The purpose of this exercise is to cr.pdf
 
Data Structure -List Stack Queue
Data Structure -List Stack QueueData Structure -List Stack Queue
Data Structure -List Stack Queue
 
Linked lists
Linked listsLinked lists
Linked lists
 
Ch 1 intriductions
Ch 1 intriductionsCh 1 intriductions
Ch 1 intriductions
 
Objective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdfObjective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdf
 
Objective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdfObjective The purpose of this exercise is to create a Linke.pdf
Objective The purpose of this exercise is to create a Linke.pdf
 
In the rest of this lab, you will help build such a list class. The .pdf
In the rest of this lab, you will help build such a list class. The .pdfIn the rest of this lab, you will help build such a list class. The .pdf
In the rest of this lab, you will help build such a list class. The .pdf
 
Ch-8.pdf
Ch-8.pdfCh-8.pdf
Ch-8.pdf
 
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docxAD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
 
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docxAssg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
 
Linked lists 1
Linked lists 1Linked lists 1
Linked lists 1
 

More from eyeattractionsindia

Thirty years ago Clarkin was a small city about 70000 res.pdf
Thirty years ago Clarkin was a small city about 70000 res.pdfThirty years ago Clarkin was a small city about 70000 res.pdf
Thirty years ago Clarkin was a small city about 70000 res.pdf
eyeattractionsindia
 
The employees name is Nancy Reinhart and she has been with.pdf
The employees name is Nancy Reinhart and she has been with.pdfThe employees name is Nancy Reinhart and she has been with.pdf
The employees name is Nancy Reinhart and she has been with.pdf
eyeattractionsindia
 
Part 1 Outbreak Description Instructions Read the followin.pdf
Part 1 Outbreak Description Instructions Read the followin.pdfPart 1 Outbreak Description Instructions Read the followin.pdf
Part 1 Outbreak Description Instructions Read the followin.pdf
eyeattractionsindia
 
Cuando los enlogos producen vino usan levadura para conver.pdf
Cuando los enlogos producen vino usan levadura para conver.pdfCuando los enlogos producen vino usan levadura para conver.pdf
Cuando los enlogos producen vino usan levadura para conver.pdf
eyeattractionsindia
 
In the skeleton above identify by name or number the follow.pdf
In the skeleton above identify by name or number the follow.pdfIn the skeleton above identify by name or number the follow.pdf
In the skeleton above identify by name or number the follow.pdf
eyeattractionsindia
 
Captulo 7 2 Si un recipiente de paredes flexibles estuvie.pdf
Captulo 7  2 Si un recipiente de paredes flexibles estuvie.pdfCaptulo 7  2 Si un recipiente de paredes flexibles estuvie.pdf
Captulo 7 2 Si un recipiente de paredes flexibles estuvie.pdf
eyeattractionsindia
 

More from eyeattractionsindia (20)

Thirty years ago Clarkin was a small city about 70000 res.pdf
Thirty years ago Clarkin was a small city about 70000 res.pdfThirty years ago Clarkin was a small city about 70000 res.pdf
Thirty years ago Clarkin was a small city about 70000 res.pdf
 
When dealing with which class of thitd party entity might an.pdf
When dealing with which class of thitd party entity might an.pdfWhen dealing with which class of thitd party entity might an.pdf
When dealing with which class of thitd party entity might an.pdf
 
What does the following loop print USE A TRACE TABLE to exp.pdf
What does the following loop print USE A TRACE TABLE to exp.pdfWhat does the following loop print USE A TRACE TABLE to exp.pdf
What does the following loop print USE A TRACE TABLE to exp.pdf
 
The employees name is Nancy Reinhart and she has been with.pdf
The employees name is Nancy Reinhart and she has been with.pdfThe employees name is Nancy Reinhart and she has been with.pdf
The employees name is Nancy Reinhart and she has been with.pdf
 
Read Recognition of Insufficient competenceNurses Experien.pdf
Read Recognition of Insufficient competenceNurses Experien.pdfRead Recognition of Insufficient competenceNurses Experien.pdf
Read Recognition of Insufficient competenceNurses Experien.pdf
 
MC40620A Firmeial Accounting NOV22 INTAKE Awignment Arief .pdf
MC40620A Firmeial Accounting  NOV22 INTAKE Awignment Arief .pdfMC40620A Firmeial Accounting  NOV22 INTAKE Awignment Arief .pdf
MC40620A Firmeial Accounting NOV22 INTAKE Awignment Arief .pdf
 
Part 1 Outbreak Description Instructions Read the followin.pdf
Part 1 Outbreak Description Instructions Read the followin.pdfPart 1 Outbreak Description Instructions Read the followin.pdf
Part 1 Outbreak Description Instructions Read the followin.pdf
 
How can you tell if a group is functioning Collaboratively v.pdf
How can you tell if a group is functioning Collaboratively v.pdfHow can you tell if a group is functioning Collaboratively v.pdf
How can you tell if a group is functioning Collaboratively v.pdf
 
no assumption in a regression model is violated then the OL.pdf
no assumption in a regression model is violated then the OL.pdfno assumption in a regression model is violated then the OL.pdf
no assumption in a regression model is violated then the OL.pdf
 
Leon has 57000 to invest today at 4 to pay a debt of 78.pdf
Leon has 57000 to invest today at 4 to pay a debt of 78.pdfLeon has 57000 to invest today at 4 to pay a debt of 78.pdf
Leon has 57000 to invest today at 4 to pay a debt of 78.pdf
 
Murphy Co tena 200000 acciones en circulacin de 10 de a.pdf
Murphy Co tena 200000 acciones en circulacin de 10 de a.pdfMurphy Co tena 200000 acciones en circulacin de 10 de a.pdf
Murphy Co tena 200000 acciones en circulacin de 10 de a.pdf
 
Cuando los enlogos producen vino usan levadura para conver.pdf
Cuando los enlogos producen vino usan levadura para conver.pdfCuando los enlogos producen vino usan levadura para conver.pdf
Cuando los enlogos producen vino usan levadura para conver.pdf
 
Cul es su estilo de gestin de conflictos Encuentre y p.pdf
Cul es su estilo de gestin de conflictos   Encuentre y p.pdfCul es su estilo de gestin de conflictos   Encuentre y p.pdf
Cul es su estilo de gestin de conflictos Encuentre y p.pdf
 
In the skeleton above identify by name or number the follow.pdf
In the skeleton above identify by name or number the follow.pdfIn the skeleton above identify by name or number the follow.pdf
In the skeleton above identify by name or number the follow.pdf
 
I dont understand where the number 122 comes from I see i.pdf
I dont understand where the number 122 comes from I see i.pdfI dont understand where the number 122 comes from I see i.pdf
I dont understand where the number 122 comes from I see i.pdf
 
FCF Co has 14000 shares outstanding and a total market val.pdf
FCF Co has 14000 shares outstanding and a total market val.pdfFCF Co has 14000 shares outstanding and a total market val.pdf
FCF Co has 14000 shares outstanding and a total market val.pdf
 
For 15 years Janet saved 300 at the beginning of every mon.pdf
For 15 years Janet saved 300 at the beginning of every mon.pdfFor 15 years Janet saved 300 at the beginning of every mon.pdf
For 15 years Janet saved 300 at the beginning of every mon.pdf
 
Captulo 7 2 Si un recipiente de paredes flexibles estuvie.pdf
Captulo 7  2 Si un recipiente de paredes flexibles estuvie.pdfCaptulo 7  2 Si un recipiente de paredes flexibles estuvie.pdf
Captulo 7 2 Si un recipiente de paredes flexibles estuvie.pdf
 
Case Study Analysis ilndividual Proiect Iotal Marks50510 .pdf
Case Study Analysis ilndividual Proiect Iotal Marks50510 .pdfCase Study Analysis ilndividual Proiect Iotal Marks50510 .pdf
Case Study Analysis ilndividual Proiect Iotal Marks50510 .pdf
 
4 25 marks Suppose that YipiindBernoullipi1+ex.pdf
4 25 marks Suppose that YipiindBernoullipi1+ex.pdf4 25 marks Suppose that YipiindBernoullipi1+ex.pdf
4 25 marks Suppose that YipiindBernoullipi1+ex.pdf
 

Recently uploaded

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 

Recently uploaded (20)

VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 

need it in c++ Task 2 Reuse the Task 1 and create 2 linkedl.pdf

  • 1. need it in c++ Task 2: Reuse the Task 1 and create 2 linkedlists L1 and L2, with data elements mentioned below. L1={1,3,5,7}// contains odd numbers L2={2,4,6,8}// contains even numbers Write a function mergeLists to merge the elements of L2 with L1 in such a way that the resultant list L1 should look like the one below: L1={1,2,3,4,5,6,7,8} Task 3: In doubly LL, each node of a linked list will have a data item which will represent the record of an employee. Following Table shows the list of Employee; Each emp is list contain 5 attributes of Employee. The data items form a linear structure in which list data items follow one after the other, from the beginning of the list to its end. The ordering of the data items is determined by when and where each data item is inserted into the list and is not a function of the data contained in the list data items. At any point in time, one data item in any nonempty list is marked using the list's cursor. You travel through the list using operations that change the position of the cursor. Your class must provide implementation for the following - Constructor to create empty list - Copy Constructor to copy all elements of linked list - IsEmpty to check if there is no data element in the list. It returns true if a list is empty. Otherwise, returns false - Insert function to insert employee. If the list is not empty, then inserts emp at the end - Search function to search employee - Remove function to remove the data item whose employee id matched the parameter id Foundation for Advancement of science and Technology National University of Computer & Emerging Sciences (NUCES), School of Computing - UpdateSalary function which locate the data item whose employee id matches the parameter id, then update the respective data item salary member with the parameter salary - MaximumSalary function which searches for the employee having maximum salary - A function to print the data of linked list