SlideShare a Scribd company logo
1 of 1
Download to read offline
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

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.pdfvinaythemodel
 
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.pdfinfo785431
 
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.pdftesmondday29076
 
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).docxSHIVA101531
 
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.docxnoreendchesterton753
 
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 .docxajoy21
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.pptWaf1231
 
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.pdfSALES97
 
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.pdfaroraopticals15
 
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, .pdfArrowdeepak
 
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.pdfaamousnowov
 
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.pdfinfo706022
 
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.pdfConint29
 
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 .pdfrohit219406
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfferoz544
 

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
 
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
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdf
 

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 .pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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 .pdfambersushil
 
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.pdfambersushil
 
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..pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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). .pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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�.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 
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.pdfambersushil
 

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

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 

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