SlideShare a Scribd company logo
Java Assignment
Using the ListNode.java file below
Write methods called min and max that return the smallest and largest values in the linked list.
These methods will be added to your ListNode class. For example if a variable called list stores
{11, -7, 3, 42, 0, 14], the call of list.min() should return -7 and the call of list.max() should return
42. If the list is empty, return -1. Print the returned value.
Write a method called insertNode that inserts a new node anywhere in your linked list. Display
your linked list with new value.
Write a program to test these methods to ensure accuracy and successful implementation. Upload
your modified version of the ListNode java file only.
Note: Original code should still be included. You will make additions and slight modifications
where necessary. Throw exceptions where you think is necessary. // Listlode is a class for storing
a single node of a linked // list. This node class is for a list of integer values. public class Listlode
{ public int data; //data stored in this node public Listliode front;//points to head node public
Listliode next; /f link to next node in the list // post: constructs a node with data and null link
public Listlode() { 3. // post: constructs a node with given data and null link: public Listlode(int
data) { this(data, null); 3 // post: constructs a node with given data and given link. public
Listlode(int data, Listliode next) { this.data = data; this. next = next; 3 public String toString() {
if (front = null) : } else { String result = " ["+ front data; Listliode current = front. next; while
(current != null) { result +=m,m+ current data, current = current. next; 3 result += " ]n - return
result; 3. }// post: appends the given value to the end of the list public void add(int value) &
puolic void aod if (front = nult) {. front = new Listlode (value); 3 else { Listlode current =
front; whistiode current = front; while (current next I= null) { current = current. next; 3 current.
next = new Listliode (value ); 3. 3 J// post : returns the position of the first occurrence of the
given /l value (-1 if not found ) public void remove (int index) { if ( index =){ } else { Listiode
current = nodeAt ( index - 1); current. next = current. next. next, 3 3 3// pre : <=i< size() // post:
returns a reference to the node at the given index public Listlode nodeAt (int index) : List Node
current = front; for (int i=0;i< index; i++) { current = current. next. }. return current; 3

More Related Content

Similar to Java AssignmentUsing the ListNode.java file below Write method.pdf

Unit - 2.pdf
Unit - 2.pdfUnit - 2.pdf
Unit - 2.pdf
AravindAnand21
 
Can somebody solve the TODO parts of the following problem- Thanks D.pdf
Can somebody solve the TODO parts of the following problem- Thanks   D.pdfCan somebody solve the TODO parts of the following problem- Thanks   D.pdf
Can somebody solve the TODO parts of the following problem- Thanks D.pdf
vinaythemodel
 
Write a JAVA LinkedListRec class that has the following methods siz.pdf
Write a JAVA LinkedListRec class that has the following methods siz.pdfWrite a JAVA LinkedListRec class that has the following methods siz.pdf
Write a JAVA LinkedListRec class that has the following methods siz.pdf
info785431
 
Dividing a linked list into two sublists of almost equal sizesa. A.pdf
Dividing a linked list into two sublists of almost equal sizesa. A.pdfDividing a linked list into two sublists of almost equal sizesa. A.pdf
Dividing a linked list into two sublists of almost equal sizesa. A.pdf
tesmondday29076
 
Linked list
Linked list Linked list
Linked list
Arbind Mandal
 
Lecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docxLecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docx
SHIVA101531
 
Write a method expand that could be added to the LinkedlntList class f.docx
Write a method expand that could be added to the LinkedlntList class f.docxWrite a method expand that could be added to the LinkedlntList class f.docx
Write a method expand that could be added to the LinkedlntList class f.docx
noreendchesterton753
 
Write a method expand that could be added to the LinkedlntList class .docx
 Write a method expand that could be added to the LinkedlntList class .docx Write a method expand that could be added to the LinkedlntList class .docx
Write a method expand that could be added to the LinkedlntList class .docx
ajoy21
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.ppt
Waf1231
 
Data Structures and Agorithm: DS 04 Linked List.pptx
Data Structures and Agorithm: DS 04 Linked List.pptxData Structures and Agorithm: DS 04 Linked List.pptx
Data Structures and Agorithm: DS 04 Linked List.pptx
RashidFaridChishti
 
In java.Write a class called GenDoubleLinkedList which is a generi.pdf
In java.Write a class called GenDoubleLinkedList which is a generi.pdfIn java.Write a class called GenDoubleLinkedList which is a generi.pdf
In java.Write a class called GenDoubleLinkedList which is a generi.pdf
SALES97
 
Select three methods in the ObjectList class to work through algori.pdf
Select three methods in the ObjectList class to work through algori.pdfSelect three methods in the ObjectList class to work through algori.pdf
Select three methods in the ObjectList class to work through algori.pdf
aroraopticals15
 
Adt of lists
Adt of listsAdt of lists
Adt of lists
Nivegeetha
 
Write an algorithm that reads a list of integers from the keyboard, .pdf
Write an algorithm that reads a list of integers from the keyboard, .pdfWrite an algorithm that reads a list of integers from the keyboard, .pdf
Write an algorithm that reads a list of integers from the keyboard, .pdf
Arrowdeepak
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdf
aamousnowov
 
Write a function to merge two doubly linked lists. The input lists ha.pdf
Write a function to merge two doubly linked lists. The input lists ha.pdfWrite a function to merge two doubly linked lists. The input lists ha.pdf
Write a function to merge two doubly linked lists. The input lists ha.pdf
info706022
 
File LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdfFile LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdf
Conint29
 
Data Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdfData Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdf
rohit219406
 
10-linked-list.ppt
10-linked-list.ppt10-linked-list.ppt
10-linked-list.ppt
ssuserd6577b1
 

Similar to Java AssignmentUsing the ListNode.java file below Write method.pdf (20)

Unit - 2.pdf
Unit - 2.pdfUnit - 2.pdf
Unit - 2.pdf
 
Can somebody solve the TODO parts of the following problem- Thanks D.pdf
Can somebody solve the TODO parts of the following problem- Thanks   D.pdfCan somebody solve the TODO parts of the following problem- Thanks   D.pdf
Can somebody solve the TODO parts of the following problem- Thanks D.pdf
 
Write a JAVA LinkedListRec class that has the following methods siz.pdf
Write a JAVA LinkedListRec class that has the following methods siz.pdfWrite a JAVA LinkedListRec class that has the following methods siz.pdf
Write a JAVA LinkedListRec class that has the following methods siz.pdf
 
Dividing a linked list into two sublists of almost equal sizesa. A.pdf
Dividing a linked list into two sublists of almost equal sizesa. A.pdfDividing a linked list into two sublists of almost equal sizesa. A.pdf
Dividing a linked list into two sublists of almost equal sizesa. A.pdf
 
Linked list
Linked list Linked list
Linked list
 
Lecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docxLecture 18Dynamic Data Structures and Generics (II).docx
Lecture 18Dynamic Data Structures and Generics (II).docx
 
Write a method expand that could be added to the LinkedlntList class f.docx
Write a method expand that could be added to the LinkedlntList class f.docxWrite a method expand that could be added to the LinkedlntList class f.docx
Write a method expand that could be added to the LinkedlntList class f.docx
 
Write a method expand that could be added to the LinkedlntList class .docx
 Write a method expand that could be added to the LinkedlntList class .docx Write a method expand that could be added to the LinkedlntList class .docx
Write a method expand that could be added to the LinkedlntList class .docx
 
List
ListList
List
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.ppt
 
Data Structures and Agorithm: DS 04 Linked List.pptx
Data Structures and Agorithm: DS 04 Linked List.pptxData Structures and Agorithm: DS 04 Linked List.pptx
Data Structures and Agorithm: DS 04 Linked List.pptx
 
In java.Write a class called GenDoubleLinkedList which is a generi.pdf
In java.Write a class called GenDoubleLinkedList which is a generi.pdfIn java.Write a class called GenDoubleLinkedList which is a generi.pdf
In java.Write a class called GenDoubleLinkedList which is a generi.pdf
 
Select three methods in the ObjectList class to work through algori.pdf
Select three methods in the ObjectList class to work through algori.pdfSelect three methods in the ObjectList class to work through algori.pdf
Select three methods in the ObjectList class to work through algori.pdf
 
Adt of lists
Adt of listsAdt of lists
Adt of lists
 
Write an algorithm that reads a list of integers from the keyboard, .pdf
Write an algorithm that reads a list of integers from the keyboard, .pdfWrite an algorithm that reads a list of integers from the keyboard, .pdf
Write an algorithm that reads a list of integers from the keyboard, .pdf
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdf
 
Write a function to merge two doubly linked lists. The input lists ha.pdf
Write a function to merge two doubly linked lists. The input lists ha.pdfWrite a function to merge two doubly linked lists. The input lists ha.pdf
Write a function to merge two doubly linked lists. The input lists ha.pdf
 
File LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdfFile LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdf
 
Data Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdfData Structures in C++I am really new to C++, so links are really .pdf
Data Structures in C++I am really new to C++, so links are really .pdf
 
10-linked-list.ppt
10-linked-list.ppt10-linked-list.ppt
10-linked-list.ppt
 

More from ambersushil

Juan Williams is a writer with a best selling novel. Juan wishes to .pdf
Juan Williams is a writer with a best selling novel. Juan wishes to .pdfJuan Williams is a writer with a best selling novel. Juan wishes to .pdf
Juan Williams is a writer with a best selling novel. Juan wishes to .pdf
ambersushil
 
Juliets Delivery Services complet� las transacciones proporcionadas.pdf
Juliets Delivery Services complet� las transacciones proporcionadas.pdfJuliets Delivery Services complet� las transacciones proporcionadas.pdf
Juliets Delivery Services complet� las transacciones proporcionadas.pdf
ambersushil
 
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdfJudge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
ambersushil
 
Jones, Inc. uses the equity method of accounting for its investment .pdf
Jones, Inc. uses the equity method of accounting for its investment .pdfJones, Inc. uses the equity method of accounting for its investment .pdf
Jones, Inc. uses the equity method of accounting for its investment .pdf
ambersushil
 
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdfJohn y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
ambersushil
 
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdfJohn, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
ambersushil
 
John has recently learned about advance directives in a healthcare l.pdf
John has recently learned about advance directives in a healthcare l.pdfJohn has recently learned about advance directives in a healthcare l.pdf
John has recently learned about advance directives in a healthcare l.pdf
ambersushil
 
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdfJoe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
ambersushil
 
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdf
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdfJohanna Murray, una activista clim�tica en The National Footprint Fo.pdf
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdf
ambersushil
 
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdfJoannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
ambersushil
 
Joan accompanies her husband Dan to the clinic and reports to the nu.pdf
Joan accompanies her husband Dan to the clinic and reports to the nu.pdfJoan accompanies her husband Dan to the clinic and reports to the nu.pdf
Joan accompanies her husband Dan to the clinic and reports to the nu.pdf
ambersushil
 
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdfJim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
ambersushil
 
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdf
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdfJill and Jim are married and they have 2 children (Josh and Kenny). .pdf
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdf
ambersushil
 
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdfJet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
ambersushil
 
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdfJerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
ambersushil
 
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdfJes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
ambersushil
 
Jeremiah Restoration Company completed the following selected transa.pdf
Jeremiah Restoration Company completed the following selected transa.pdfJeremiah Restoration Company completed the following selected transa.pdf
Jeremiah Restoration Company completed the following selected transa.pdf
ambersushil
 
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdfJeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
ambersushil
 
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdfJenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
ambersushil
 
Jefferson Tutoring had the following payroll information on February.pdf
Jefferson Tutoring had the following payroll information on February.pdfJefferson Tutoring had the following payroll information on February.pdf
Jefferson Tutoring had the following payroll information on February.pdf
ambersushil
 

More from ambersushil (20)

Juan Williams is a writer with a best selling novel. Juan wishes to .pdf
Juan Williams is a writer with a best selling novel. Juan wishes to .pdfJuan Williams is a writer with a best selling novel. Juan wishes to .pdf
Juan Williams is a writer with a best selling novel. Juan wishes to .pdf
 
Juliets Delivery Services complet� las transacciones proporcionadas.pdf
Juliets Delivery Services complet� las transacciones proporcionadas.pdfJuliets Delivery Services complet� las transacciones proporcionadas.pdf
Juliets Delivery Services complet� las transacciones proporcionadas.pdf
 
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdfJudge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
Judge Mark Griffiths finds that Moodle is a relentless and predatory.pdf
 
Jones, Inc. uses the equity method of accounting for its investment .pdf
Jones, Inc. uses the equity method of accounting for its investment .pdfJones, Inc. uses the equity method of accounting for its investment .pdf
Jones, Inc. uses the equity method of accounting for its investment .pdf
 
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdfJohn y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
John y Sharon celebran un contrato de trabajo, que especifica que Jo.pdf
 
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdfJohn, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
John, Lesa y Trevor forman una sociedad de responsabilidad limitada..pdf
 
John has recently learned about advance directives in a healthcare l.pdf
John has recently learned about advance directives in a healthcare l.pdfJohn has recently learned about advance directives in a healthcare l.pdf
John has recently learned about advance directives in a healthcare l.pdf
 
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdfJoe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
Joe�s Ristorant� is a small restaurant near a college campus. It ser.pdf
 
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdf
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdfJohanna Murray, una activista clim�tica en The National Footprint Fo.pdf
Johanna Murray, una activista clim�tica en The National Footprint Fo.pdf
 
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdfJoannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
Joannie est� en la categor�a impositiva del 15. Trabaja para una em.pdf
 
Joan accompanies her husband Dan to the clinic and reports to the nu.pdf
Joan accompanies her husband Dan to the clinic and reports to the nu.pdfJoan accompanies her husband Dan to the clinic and reports to the nu.pdf
Joan accompanies her husband Dan to the clinic and reports to the nu.pdf
 
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdfJim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
Jim blindfolds Dwight and gives him a 4lb weight to hold. He then ta.pdf
 
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdf
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdfJill and Jim are married and they have 2 children (Josh and Kenny). .pdf
Jill and Jim are married and they have 2 children (Josh and Kenny). .pdf
 
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdfJet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
Jet blue airways, con sede en Nueva York, hab�a comenzado 2007 en ra.pdf
 
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdfJerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
Jerrold tiene una filosof�a con respecto a la retenci�n de empleados.pdf
 
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdfJes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
Jes�s Mart�nez es un hombre hispano de 46 a�os de su unidad. Ingres�.pdf
 
Jeremiah Restoration Company completed the following selected transa.pdf
Jeremiah Restoration Company completed the following selected transa.pdfJeremiah Restoration Company completed the following selected transa.pdf
Jeremiah Restoration Company completed the following selected transa.pdf
 
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdfJeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
Jeremy est� considerando usar mucho el color blanco en el logotipo p.pdf
 
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdfJenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
JenkinsWe have two dozen APIs to deploy, and the dev team was able.pdf
 
Jefferson Tutoring had the following payroll information on February.pdf
Jefferson Tutoring had the following payroll information on February.pdfJefferson Tutoring had the following payroll information on February.pdf
Jefferson Tutoring had the following payroll information on February.pdf
 

Recently uploaded

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
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
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
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 

Recently uploaded (20)

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
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
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
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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
 

Java AssignmentUsing the ListNode.java file below Write method.pdf

  • 1. Java Assignment Using the ListNode.java file below Write methods called min and max that return the smallest and largest values in the linked list. These methods will be added to your ListNode class. For example if a variable called list stores {11, -7, 3, 42, 0, 14], the call of list.min() should return -7 and the call of list.max() should return 42. If the list is empty, return -1. Print the returned value. Write a method called insertNode that inserts a new node anywhere in your linked list. Display your linked list with new value. Write a program to test these methods to ensure accuracy and successful implementation. Upload your modified version of the ListNode java file only. Note: Original code should still be included. You will make additions and slight modifications where necessary. Throw exceptions where you think is necessary. // Listlode is a class for storing a single node of a linked // list. This node class is for a list of integer values. public class Listlode { public int data; //data stored in this node public Listliode front;//points to head node public Listliode next; /f link to next node in the list // post: constructs a node with data and null link public Listlode() { 3. // post: constructs a node with given data and null link: public Listlode(int data) { this(data, null); 3 // post: constructs a node with given data and given link. public Listlode(int data, Listliode next) { this.data = data; this. next = next; 3 public String toString() { if (front = null) : } else { String result = " ["+ front data; Listliode current = front. next; while (current != null) { result +=m,m+ current data, current = current. next; 3 result += " ]n - return result; 3. }// post: appends the given value to the end of the list public void add(int value) & puolic void aod if (front = nult) {. front = new Listlode (value); 3 else { Listlode current = front; whistiode current = front; while (current next I= null) { current = current. next; 3 current. next = new Listliode (value ); 3. 3 J// post : returns the position of the first occurrence of the given /l value (-1 if not found ) public void remove (int index) { if ( index =){ } else { Listiode current = nodeAt ( index - 1); current. next = current. next. next, 3 3 3// pre : <=i< size() // post: returns a reference to the node at the given index public Listlode nodeAt (int index) : List Node current = front; for (int i=0;i< index; i++) { current = current. next. }. return current; 3