SlideShare a Scribd company logo
1 of 2
Download to read offline
Design a program named SortedNameList.java, which implements a list structure with linked list
node (LLNode.java). Your SortedNameList ADT should have the following methods:
Template:
public class SortedNameList{
LLNode head;
public SortedNameList(){
head=null;
}
public LLNode getHead(){
return head;
}
public boolean isEmpty(){
//return true if the list is empty, otherwise true
/* Type your code here. */
}
public void add(Name name){
//add name to the list, after this operation, the list should maintain sorted in ascending order
/* Type your code here. */
}
public void add(LLNode node){
//overloaded method: add node to the list, after this operation, the list should maintain sorted
in ascending order
/* Type your code here. */
}
public int size(){
//return the number of nodes in the list
/* Type your code here. */
return 0; // replace with yours
}
public boolean isFull(){
return false;
}
public int search(Name name){
//return index of the name (the first occurrence) in the list, return -1 if not found
/* Type your code here. */
return -10; // replace with yours
}
public LLNode get(int index){
// return the LLNode object at the specified index location, for invalid index, return null
/* Type your code here. */
return new LLNode(new Name("a","b"), null); //replace with yours
}
public void remove(int index){
//Remove node at the specified index location if valid.
/* Type your code here. */
}
public void remove(Name name){
//remove all occurences of name - please refer to Name class for details
/* Type your code here. */
}
public void removeAll(){
//remove all nodes
}
}

More Related Content

Similar to Design a program named SortedNameList.java, which implements a list .pdf

Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdfWrite the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
fathimalinks
 
Please help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdfPlease help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdf
seoagam1
 
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
 
maincpp Build and procees a sorted linked list of Patie.pdf
maincpp   Build and procees a sorted linked list of Patie.pdfmaincpp   Build and procees a sorted linked list of Patie.pdf
maincpp Build and procees a sorted linked list of Patie.pdf
adityastores21
 
Implementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdfImplementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdf
maheshkumar12354
 
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
info335653
 
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
clearvisioneyecareno
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdf
EricvtJFraserr
 
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
 
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdfHow do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
pnaran46
 
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdfPROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
climatecontrolsv
 
Need help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docxNeed help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docx
Jason0x0Scottw
 
import java.util.ArrayList; import java.util.List; .pdf
import java.util.ArrayList; import java.util.List;   .pdfimport java.util.ArrayList; import java.util.List;   .pdf
import java.util.ArrayList; import java.util.List; .pdf
anuradhasilks
 
need this program in java please and thanks!NOTICE There are NO s.pdf
need this program in java please and thanks!NOTICE There are NO s.pdfneed this program in java please and thanks!NOTICE There are NO s.pdf
need this program in java please and thanks!NOTICE There are NO s.pdf
arshin9
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
aromanets
 
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdfInspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
vishalateen
 
package singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdfpackage singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdf
amazing2001
 

Similar to Design a program named SortedNameList.java, which implements a list .pdf (20)

Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdfWrite the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
Write the following using javaGiven a class ‘Node’ and ‘NodeList’,.pdf
 
Please help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdfPlease help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).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
 
maincpp Build and procees a sorted linked list of Patie.pdf
maincpp   Build and procees a sorted linked list of Patie.pdfmaincpp   Build and procees a sorted linked list of Patie.pdf
maincpp Build and procees a sorted linked list of Patie.pdf
 
Implementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdfImplementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdf
 
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
 
I need to implment a function that can reverse a single linked list..pdf
I need to implment a function that can reverse a single linked list..pdfI need to implment a function that can reverse a single linked list..pdf
I need to implment a function that can reverse a single linked list..pdf
 
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
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.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
 
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdfHow do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
How do I fix this error - Exception in thread -main- java-lang-NullPoi.pdf
 
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdfPROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
PROBLEM STATEMENTIn this assignment, you will complete DoubleEnde.pdf
 
Implement the additional 5 methods as indicated in the LinkedList fi.pdf
Implement the additional 5 methods as indicated in the LinkedList fi.pdfImplement the additional 5 methods as indicated in the LinkedList fi.pdf
Implement the additional 5 methods as indicated in the LinkedList fi.pdf
 
Need help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docxNeed help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docx
 
import java.util.ArrayList; import java.util.List; .pdf
import java.util.ArrayList; import java.util.List;   .pdfimport java.util.ArrayList; import java.util.List;   .pdf
import java.util.ArrayList; import java.util.List; .pdf
 
Write a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdfWrite a program to implement below operations with both singly and d.pdf
Write a program to implement below operations with both singly and d.pdf
 
need this program in java please and thanks!NOTICE There are NO s.pdf
need this program in java please and thanks!NOTICE There are NO s.pdfneed this program in java please and thanks!NOTICE There are NO s.pdf
need this program in java please and thanks!NOTICE There are NO s.pdf
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
 
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdfInspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
 
package singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdfpackage singlylinkedlist; public class Node { public String valu.pdf
package singlylinkedlist; public class Node { public String valu.pdf
 

More from sumyad25

El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdfEl auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
sumyad25
 
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdfEjemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
sumyad25
 
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdfDwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
sumyad25
 

More from sumyad25 (20)

El entorno macro NO incluye (seleccione todo lo que corresponda).pdf
El entorno macro NO incluye (seleccione todo lo que corresponda).pdfEl entorno macro NO incluye (seleccione todo lo que corresponda).pdf
El entorno macro NO incluye (seleccione todo lo que corresponda).pdf
 
El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdfEl auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
El auge y la ca�da de Nokia en los tel�fonos m�viles Nokia surgi� .pdf
 
El 31 de mayo, la cuenta de Efectivo de Money Corporation mostr� u.pdf
El 31 de mayo, la cuenta de Efectivo de Money Corporation mostr� u.pdfEl 31 de mayo, la cuenta de Efectivo de Money Corporation mostr� u.pdf
El 31 de mayo, la cuenta de Efectivo de Money Corporation mostr� u.pdf
 
El 1 de mayo, JT Engineering ten�a un inventario inicial de 200 unid.pdf
El 1 de mayo, JT Engineering ten�a un inventario inicial de 200 unid.pdfEl 1 de mayo, JT Engineering ten�a un inventario inicial de 200 unid.pdf
El 1 de mayo, JT Engineering ten�a un inventario inicial de 200 unid.pdf
 
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdfEjemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
Ejemplo de estudio de caso Robin Hood Joseph Lampel, Universidad .pdf
 
Effective communication requires a clear understanding of the object.pdf
Effective communication requires a clear understanding of the object.pdfEffective communication requires a clear understanding of the object.pdf
Effective communication requires a clear understanding of the object.pdf
 
Economic situation The economy is suffering from an unemployment p.pdf
Economic situation  The economy is suffering from an unemployment p.pdfEconomic situation  The economy is suffering from an unemployment p.pdf
Economic situation The economy is suffering from an unemployment p.pdf
 
Easy Company, a corporation, is considering a variety of equity fina.pdf
Easy Company, a corporation, is considering a variety of equity fina.pdfEasy Company, a corporation, is considering a variety of equity fina.pdf
Easy Company, a corporation, is considering a variety of equity fina.pdf
 
Each DQ post must contain at least one citation from a source in sup.pdf
Each DQ post must contain at least one citation from a source in sup.pdfEach DQ post must contain at least one citation from a source in sup.pdf
Each DQ post must contain at least one citation from a source in sup.pdf
 
Duygusal zeka (EI) ile ilgili aadaki ifadelerden hangisi dorudur .pdf
Duygusal zeka (EI) ile ilgili aadaki ifadelerden hangisi dorudur .pdfDuygusal zeka (EI) ile ilgili aadaki ifadelerden hangisi dorudur .pdf
Duygusal zeka (EI) ile ilgili aadaki ifadelerden hangisi dorudur .pdf
 
Durum L�tfen aadaki durumu Art. 101 TFEU ve VBER. Cnin Sanat anlam.pdf
Durum L�tfen aadaki durumu Art. 101 TFEU ve VBER. Cnin Sanat anlam.pdfDurum L�tfen aadaki durumu Art. 101 TFEU ve VBER. Cnin Sanat anlam.pdf
Durum L�tfen aadaki durumu Art. 101 TFEU ve VBER. Cnin Sanat anlam.pdf
 
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdfDwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
Dwight Schrute, Scranton, PA konumu i�in bir kat irketi olan Dunder .pdf
 
During the month of June, Ace Incorporated purchased goods from two .pdf
During the month of June, Ace Incorporated purchased goods from two .pdfDuring the month of June, Ace Incorporated purchased goods from two .pdf
During the month of June, Ace Incorporated purchased goods from two .pdf
 
Durante el mes de agosto, Boyce Company tuvo las siguientes transacc.pdf
Durante el mes de agosto, Boyce Company tuvo las siguientes transacc.pdfDurante el mes de agosto, Boyce Company tuvo las siguientes transacc.pdf
Durante el mes de agosto, Boyce Company tuvo las siguientes transacc.pdf
 
Dukane Company expects to produce 1.2 million units of product XX in.pdf
Dukane Company expects to produce 1.2 million units of product XX in.pdfDukane Company expects to produce 1.2 million units of product XX in.pdf
Dukane Company expects to produce 1.2 million units of product XX in.pdf
 
Doru mu Yanl m sorusu 1.Finansal tablolarn yaynlanmasndan sonra or.pdf
Doru mu Yanl m sorusu 1.Finansal tablolarn yaynlanmasndan sonra or.pdfDoru mu Yanl m sorusu 1.Finansal tablolarn yaynlanmasndan sonra or.pdf
Doru mu Yanl m sorusu 1.Finansal tablolarn yaynlanmasndan sonra or.pdf
 
Drop down options DECREASE or INCREASE The graph below is associate.pdf
Drop down options DECREASE or INCREASE The graph below is associate.pdfDrop down options DECREASE or INCREASE The graph below is associate.pdf
Drop down options DECREASE or INCREASE The graph below is associate.pdf
 
DRK, Inc., halka arzda 200.000 hisse satt. Sigortacnn a�k �cretleri .pdf
DRK, Inc., halka arzda 200.000 hisse satt. Sigortacnn a�k �cretleri .pdfDRK, Inc., halka arzda 200.000 hisse satt. Sigortacnn a�k �cretleri .pdf
DRK, Inc., halka arzda 200.000 hisse satt. Sigortacnn a�k �cretleri .pdf
 
Dmitri has saved $30 per week to buy a preowned gaming console. He c.pdf
Dmitri has saved $30 per week to buy a preowned gaming console. He c.pdfDmitri has saved $30 per week to buy a preowned gaming console. He c.pdf
Dmitri has saved $30 per week to buy a preowned gaming console. He c.pdf
 
Draw particle trajectories representing the transformation of the ye.pdf
Draw particle trajectories representing the transformation of the ye.pdfDraw particle trajectories representing the transformation of the ye.pdf
Draw particle trajectories representing the transformation of the ye.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

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.
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Design a program named SortedNameList.java, which implements a list .pdf

  • 1. Design a program named SortedNameList.java, which implements a list structure with linked list node (LLNode.java). Your SortedNameList ADT should have the following methods: Template: public class SortedNameList{ LLNode head; public SortedNameList(){ head=null; } public LLNode getHead(){ return head; } public boolean isEmpty(){ //return true if the list is empty, otherwise true /* Type your code here. */ } public void add(Name name){ //add name to the list, after this operation, the list should maintain sorted in ascending order /* Type your code here. */ } public void add(LLNode node){ //overloaded method: add node to the list, after this operation, the list should maintain sorted in ascending order /* Type your code here. */ } public int size(){ //return the number of nodes in the list /* Type your code here. */
  • 2. return 0; // replace with yours } public boolean isFull(){ return false; } public int search(Name name){ //return index of the name (the first occurrence) in the list, return -1 if not found /* Type your code here. */ return -10; // replace with yours } public LLNode get(int index){ // return the LLNode object at the specified index location, for invalid index, return null /* Type your code here. */ return new LLNode(new Name("a","b"), null); //replace with yours } public void remove(int index){ //Remove node at the specified index location if valid. /* Type your code here. */ } public void remove(Name name){ //remove all occurences of name - please refer to Name class for details /* Type your code here. */ } public void removeAll(){ //remove all nodes } }