SlideShare a Scribd company logo
Please help me to make a programming project I have to sue them today. Please help me make a
UnsortedList and SortedList classes. The instructor give me The code of the List and AbstracList
Classes that 2 pages we do not modify them. Do not modify this pages!!! List.java import
java.util.Iterator; /** * Represents List interface. * * @author Varik Hoang * @version Sep 26,
2016 * @param is of any object type. */ public interface List { /** * The method returns the
current number of elements in the list. * * @return the current number of elements in the list
greater than or equal 0 */ public int getSize(); /** * The method returns whether the list is empty.
* * @return true if list is empty, false otherwise. */ public boolean isEmpty(); /** * The method
returns whether value is in the list. * * @param value the value is assigned * @return true if
value in the list, false otherwise. */ public boolean contains(Type value); /** * The method
inserts an element into the list. * * @param value the value is assigned */ public void insert(Type
value); /** * The method clears the list. */ public void clear(); /** * The method returns a string
representation of list contents. * * @return a string representation of list contents. * @see
Object#toString() */ @Override public String toString(); /** * /** * The method removes first
element occurrence from the list. * * @param value the value is assigned * @return the removed
value */ public Type remove(Type value); /** * The method returns the index of value. * *
@param value the value is assigned. * @return the index of value if in the list, -1 otherwise. */
public int getIndex(Type value); /** * The method removes value at the given index. * *
@param index the index must be in range of 0 and size * @return the removed value * @throws
IndexOutOfBoundsException if index less than 0 or index greater than * or equal size */ public
Type removeAtIndex(int index); /** * The method replaces the value at the given index with the
given value. * * @param index the index must be in range of 0 and size * @param value the
value is assigned * @throws IndexOutOfBoundsException if index less 0 or index greater than
size */ public void set(int index, Type value); /** * Returns the value at the given index in the
list. * * @param index the index must be in range of 0 and size * @throws
IndexOutOfBoundsException if index less than 0 or greater size * @return the value at the given
index in the list. */ public Type get(int index); /** * The method returns an iterator for this list. *
* @return an iterator for the list. */ public Iterator iterator(); } Do not modify this pages public
abstract class AbstractList implements List { /** * The reference to the last element */ protected
ListNode tail; /** * The size of the list */ protected int size; /** * The constructor that initiate the
tail and size references */ public AbstractList() { tail = null; size = 0; } @Override public int
getSize() { return size; } @Override public boolean isEmpty() { return size == 0; } @Override
public int getIndex(final Type value) { if (value == null) throw new NullPointerException("The
value could not be null"); if (tail == null) return -1; ListNode current = tail.next; // point to head
for (int index = 0; index < size; index++) { if (current.data.equals(value)) return index; current =
current.next; } return -1; } @Override public String toString() { if (size == 0) return "[]";
StringBuilder builder = new StringBuilder(); builder.append("["); ListNode current = tail.next; //
head node while (current != tail) { builder.append(current.data).append(",").append(" "); current
= current.next; } builder.append(tail.data); builder.append("]"); return builder.toString(); } /** *
Returns an iterator for this list. * * @return an iterator for the list. */ public Iterator iterator() {
return new LinkedIterator(); } /** * Represents a list node. * * @author Building Java Programs
3rd ed. * @param is of any object type */ protected static class ListNode { /** * Data stored in
this node. */ public final Type data; /** * Link to next node in the list. */ public ListNode next;
/** * Constructs a node with given data and a null link. * * @param data assigned */ public
ListNode(Type data) { this(data, null); } /** * Constructs a node with given data and given link.
* * @param data assigned * @param next assigned */ public ListNode(Type data, ListNode
next) { this.data = data; this.next = next; } /** * The method returns the generic data type as
string */ public String toString() { return this.data.toString(); } } /** * The iterator class for the
list. * * @author modified from BuildingJavaPrograms 3rd Edition */ public class LinkedIterator
implements Iterator { /** * Location of current value to return. */ private ListNode current; /** *
The flag that tells if the first node has been visited. */ private boolean visited; /** * Constructs an
iterator for the given list. */ public LinkedIterator() { reset(); } /** * Returns whether there are
more list elements. * * @return true if there are more elements left, false otherwise * @see
java.util.Iterator#hasNext() */ public boolean hasNext() { if (tail != null) return !(current ==
tail.next && visited); else return false; } /** * Returns the next element in the iteration. * *
@throws NoSuchElementException if no more elements. * @return the next element in the
iteration. * @see java.util.Iterator#next() */ public Type next() { if (!hasNext()) { throw new
NoSuchElementException(); } Type result = current.data; current = current.next; visited = true;
return result; } /** * This method is not supported */ public void remove() { throw new
IllegalStateException("This iterator does not support remove operation"); } /** * The method
resets back to the beginning. */ public final void reset() { if (tail != null) current = tail.next;
visited = false; } } } Now you must only use the Todo tags to implement the methods for Both
Sorted and UnsortedList classes. Please compile with no errors! You can do sanity check below:
please make sure you passed all the sanity check before you posted the answers. Thank you!!!
http://18.224.94.128/course/index.php?contest=51&pass=1735
Ad

More Related Content

Similar to Please help me to make a programming project I have to sue them today- (1).pdf (20)

STAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdfSTAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdf
babitasingh698417
 
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
 
Note- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdfNote- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdf
Stewart29UReesa
 
Class DiagramIn the Assignment #10, you are given three files Ass.pdf
Class DiagramIn the Assignment #10, you are given three files Ass.pdfClass DiagramIn the Assignment #10, you are given three files Ass.pdf
Class DiagramIn the Assignment #10, you are given three files Ass.pdf
xlynettalampleyxc
 
Note- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docxNote- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docx
VictorzH8Bondx
 
Note             Given Code modified as required and required met.pdf
Note             Given Code modified as required and required met.pdfNote             Given Code modified as required and required met.pdf
Note             Given Code modified as required and required met.pdf
Ankitchhabra28
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
fantasiatheoutofthef
 
Write a java class LIST that outputsmainpublic class Ass.pdf
Write a java class LIST that outputsmainpublic class Ass.pdfWrite a java class LIST that outputsmainpublic class Ass.pdf
Write a java class LIST that outputsmainpublic class Ass.pdf
ebrahimbadushata00
 
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdf
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdfCopy your completed LinkedList class from Lab 3 into the LinkedList..pdf
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdf
facevenky
 
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
 
The LinkedList1 class implements a Linked list. class.pdf
The LinkedList1 class implements a Linked list. class.pdfThe LinkedList1 class implements a Linked list. class.pdf
The LinkedList1 class implements a Linked list. class.pdf
malavshah9013
 
import java.util.Iterator; import java.util.NoSuchElementException; .pdf
  import java.util.Iterator; import java.util.NoSuchElementException; .pdf  import java.util.Iterator; import java.util.NoSuchElementException; .pdf
import java.util.Iterator; import java.util.NoSuchElementException; .pdf
deepakangel
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
freddysarabia1
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdf
archgeetsenterprises
 
Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
sales87
 
Sorted number list implementation with linked listsStep 1 Inspec.pdf
 Sorted number list implementation with linked listsStep 1 Inspec.pdf Sorted number list implementation with linked listsStep 1 Inspec.pdf
Sorted number list implementation with linked listsStep 1 Inspec.pdf
almaniaeyewear
 
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
 
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdfHow do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
mail931892
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
asarudheen07
 
2.(Sorted list array implementation)This sorted list ADT discussed .pdf
2.(Sorted list array implementation)This sorted list ADT discussed .pdf2.(Sorted list array implementation)This sorted list ADT discussed .pdf
2.(Sorted list array implementation)This sorted list ADT discussed .pdf
arshin9
 
STAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdfSTAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdf
babitasingh698417
 
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
 
Note- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdfNote- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdf
Stewart29UReesa
 
Class DiagramIn the Assignment #10, you are given three files Ass.pdf
Class DiagramIn the Assignment #10, you are given three files Ass.pdfClass DiagramIn the Assignment #10, you are given three files Ass.pdf
Class DiagramIn the Assignment #10, you are given three files Ass.pdf
xlynettalampleyxc
 
Note- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docxNote- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docx
VictorzH8Bondx
 
Note             Given Code modified as required and required met.pdf
Note             Given Code modified as required and required met.pdfNote             Given Code modified as required and required met.pdf
Note             Given Code modified as required and required met.pdf
Ankitchhabra28
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
fantasiatheoutofthef
 
Write a java class LIST that outputsmainpublic class Ass.pdf
Write a java class LIST that outputsmainpublic class Ass.pdfWrite a java class LIST that outputsmainpublic class Ass.pdf
Write a java class LIST that outputsmainpublic class Ass.pdf
ebrahimbadushata00
 
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdf
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdfCopy your completed LinkedList class from Lab 3 into the LinkedList..pdf
Copy your completed LinkedList class from Lab 3 into the LinkedList..pdf
facevenky
 
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
 
The LinkedList1 class implements a Linked list. class.pdf
The LinkedList1 class implements a Linked list. class.pdfThe LinkedList1 class implements a Linked list. class.pdf
The LinkedList1 class implements a Linked list. class.pdf
malavshah9013
 
import java.util.Iterator; import java.util.NoSuchElementException; .pdf
  import java.util.Iterator; import java.util.NoSuchElementException; .pdf  import java.util.Iterator; import java.util.NoSuchElementException; .pdf
import java.util.Iterator; import java.util.NoSuchElementException; .pdf
deepakangel
 
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdfLabprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
Labprogram.javaLinkedList.javaimport java.util.NoSuchElementEx.pdf
freddysarabia1
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdf
archgeetsenterprises
 
Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
sales87
 
Sorted number list implementation with linked listsStep 1 Inspec.pdf
 Sorted number list implementation with linked listsStep 1 Inspec.pdf Sorted number list implementation with linked listsStep 1 Inspec.pdf
Sorted number list implementation with linked listsStep 1 Inspec.pdf
almaniaeyewear
 
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
 
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdfHow do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
How do I fix it in LinkedList.javaLabProgram.javaLinkedList.jav.pdf
mail931892
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
asarudheen07
 
2.(Sorted list array implementation)This sorted list ADT discussed .pdf
2.(Sorted list array implementation)This sorted list ADT discussed .pdf2.(Sorted list array implementation)This sorted list ADT discussed .pdf
2.(Sorted list array implementation)This sorted list ADT discussed .pdf
arshin9
 

More from seoagam1 (20)

Prepare the Journal entries for each Transactions 44- The Watson Foun.pdf
Prepare the Journal entries for each Transactions  44- The Watson Foun.pdfPrepare the Journal entries for each Transactions  44- The Watson Foun.pdf
Prepare the Journal entries for each Transactions 44- The Watson Foun.pdf
seoagam1
 
Prepare journal entries to record the following merchandising transact.pdf
Prepare journal entries to record the following merchandising transact.pdfPrepare journal entries to record the following merchandising transact.pdf
Prepare journal entries to record the following merchandising transact.pdf
seoagam1
 
Prepare a partmers' capital statement for JL Company based on the foll.pdf
Prepare a partmers' capital statement for JL Company based on the foll.pdfPrepare a partmers' capital statement for JL Company based on the foll.pdf
Prepare a partmers' capital statement for JL Company based on the foll.pdf
seoagam1
 
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdfPreoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
seoagam1
 
Prepare a classified balance sheet in good form- (List Current Assets.pdf
Prepare a classified balance sheet in good form- (List Current Assets.pdfPrepare a classified balance sheet in good form- (List Current Assets.pdf
Prepare a classified balance sheet in good form- (List Current Assets.pdf
seoagam1
 
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdfPreliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
seoagam1
 
Practice Question You have discovered a creature while looking at some.pdf
Practice Question You have discovered a creature while looking at some.pdfPractice Question You have discovered a creature while looking at some.pdf
Practice Question You have discovered a creature while looking at some.pdf
seoagam1
 
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdfPow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
seoagam1
 
Povet Compary is one of the worlds leading com refiners- It produces t.pdf
Povet Compary is one of the worlds leading com refiners- It produces t.pdfPovet Compary is one of the worlds leading com refiners- It produces t.pdf
Povet Compary is one of the worlds leading com refiners- It produces t.pdf
seoagam1
 
Post your responses to the following questions on infection control an.pdf
Post your responses to the following questions on infection control an.pdfPost your responses to the following questions on infection control an.pdf
Post your responses to the following questions on infection control an.pdf
seoagam1
 
Political Risk is also called Bank Risk Transportation Risk Economic R.pdf
Political Risk is also called Bank Risk Transportation Risk Economic R.pdfPolitical Risk is also called Bank Risk Transportation Risk Economic R.pdf
Political Risk is also called Bank Risk Transportation Risk Economic R.pdf
seoagam1
 
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdfpopulition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
seoagam1
 
Policymakers see integrated health information networks as a panacea f.pdf
Policymakers see integrated health information networks as a panacea f.pdfPolicymakers see integrated health information networks as a panacea f.pdf
Policymakers see integrated health information networks as a panacea f.pdf
seoagam1
 
polymorphism means building data with methods True False Question 12 (.pdf
polymorphism means building data with methods True False Question 12 (.pdfpolymorphism means building data with methods True False Question 12 (.pdf
polymorphism means building data with methods True False Question 12 (.pdf
seoagam1
 
Plz explainwell (d) Consider the following snippet of C code int i-a-.pdf
Plz explainwell  (d) Consider the following snippet of C code int i-a-.pdfPlz explainwell  (d) Consider the following snippet of C code int i-a-.pdf
Plz explainwell (d) Consider the following snippet of C code int i-a-.pdf
seoagam1
 
Please write solutions with work shown- Thank you- We pick at random a.pdf
Please write solutions with work shown- Thank you- We pick at random a.pdfPlease write solutions with work shown- Thank you- We pick at random a.pdf
Please write solutions with work shown- Thank you- We pick at random a.pdf
seoagam1
 
PLS help answer all wuestions 2) Explain why the tiktaalik was a key.pdf
PLS help answer all wuestions   2) Explain why the tiktaalik was a key.pdfPLS help answer all wuestions   2) Explain why the tiktaalik was a key.pdf
PLS help answer all wuestions 2) Explain why the tiktaalik was a key.pdf
seoagam1
 
Please use the following numbers to demonstrate how Diffie Hellman Key.pdf
Please use the following numbers to demonstrate how Diffie Hellman Key.pdfPlease use the following numbers to demonstrate how Diffie Hellman Key.pdf
Please use the following numbers to demonstrate how Diffie Hellman Key.pdf
seoagam1
 
Please use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdfPlease use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdf
seoagam1
 
Please use the following table of data for the 4 questions that follow.pdf
Please use the following table of data for the 4 questions that follow.pdfPlease use the following table of data for the 4 questions that follow.pdf
Please use the following table of data for the 4 questions that follow.pdf
seoagam1
 
Prepare the Journal entries for each Transactions 44- The Watson Foun.pdf
Prepare the Journal entries for each Transactions  44- The Watson Foun.pdfPrepare the Journal entries for each Transactions  44- The Watson Foun.pdf
Prepare the Journal entries for each Transactions 44- The Watson Foun.pdf
seoagam1
 
Prepare journal entries to record the following merchandising transact.pdf
Prepare journal entries to record the following merchandising transact.pdfPrepare journal entries to record the following merchandising transact.pdf
Prepare journal entries to record the following merchandising transact.pdf
seoagam1
 
Prepare a partmers' capital statement for JL Company based on the foll.pdf
Prepare a partmers' capital statement for JL Company based on the foll.pdfPrepare a partmers' capital statement for JL Company based on the foll.pdf
Prepare a partmers' capital statement for JL Company based on the foll.pdf
seoagam1
 
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdfPreoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
Preoperative diagnosis- Morbid obesity Procedure- Cancellation of gast.pdf
seoagam1
 
Prepare a classified balance sheet in good form- (List Current Assets.pdf
Prepare a classified balance sheet in good form- (List Current Assets.pdfPrepare a classified balance sheet in good form- (List Current Assets.pdf
Prepare a classified balance sheet in good form- (List Current Assets.pdf
seoagam1
 
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdfPreliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
Preliminary phase- Acknowledgement phase- Transitional phase- Resoluti.pdf
seoagam1
 
Practice Question You have discovered a creature while looking at some.pdf
Practice Question You have discovered a creature while looking at some.pdfPractice Question You have discovered a creature while looking at some.pdf
Practice Question You have discovered a creature while looking at some.pdf
seoagam1
 
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdfPow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
Pow have the fullowine aldaional information- Senteickion a 42-4sin 1-.pdf
seoagam1
 
Povet Compary is one of the worlds leading com refiners- It produces t.pdf
Povet Compary is one of the worlds leading com refiners- It produces t.pdfPovet Compary is one of the worlds leading com refiners- It produces t.pdf
Povet Compary is one of the worlds leading com refiners- It produces t.pdf
seoagam1
 
Post your responses to the following questions on infection control an.pdf
Post your responses to the following questions on infection control an.pdfPost your responses to the following questions on infection control an.pdf
Post your responses to the following questions on infection control an.pdf
seoagam1
 
Political Risk is also called Bank Risk Transportation Risk Economic R.pdf
Political Risk is also called Bank Risk Transportation Risk Economic R.pdfPolitical Risk is also called Bank Risk Transportation Risk Economic R.pdf
Political Risk is also called Bank Risk Transportation Risk Economic R.pdf
seoagam1
 
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdfpopulition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
populition of 2-5 - and 10- Livied below ane the ene dilferent aanples.pdf
seoagam1
 
Policymakers see integrated health information networks as a panacea f.pdf
Policymakers see integrated health information networks as a panacea f.pdfPolicymakers see integrated health information networks as a panacea f.pdf
Policymakers see integrated health information networks as a panacea f.pdf
seoagam1
 
polymorphism means building data with methods True False Question 12 (.pdf
polymorphism means building data with methods True False Question 12 (.pdfpolymorphism means building data with methods True False Question 12 (.pdf
polymorphism means building data with methods True False Question 12 (.pdf
seoagam1
 
Plz explainwell (d) Consider the following snippet of C code int i-a-.pdf
Plz explainwell  (d) Consider the following snippet of C code int i-a-.pdfPlz explainwell  (d) Consider the following snippet of C code int i-a-.pdf
Plz explainwell (d) Consider the following snippet of C code int i-a-.pdf
seoagam1
 
Please write solutions with work shown- Thank you- We pick at random a.pdf
Please write solutions with work shown- Thank you- We pick at random a.pdfPlease write solutions with work shown- Thank you- We pick at random a.pdf
Please write solutions with work shown- Thank you- We pick at random a.pdf
seoagam1
 
PLS help answer all wuestions 2) Explain why the tiktaalik was a key.pdf
PLS help answer all wuestions   2) Explain why the tiktaalik was a key.pdfPLS help answer all wuestions   2) Explain why the tiktaalik was a key.pdf
PLS help answer all wuestions 2) Explain why the tiktaalik was a key.pdf
seoagam1
 
Please use the following numbers to demonstrate how Diffie Hellman Key.pdf
Please use the following numbers to demonstrate how Diffie Hellman Key.pdfPlease use the following numbers to demonstrate how Diffie Hellman Key.pdf
Please use the following numbers to demonstrate how Diffie Hellman Key.pdf
seoagam1
 
Please use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdfPlease use the code below and make it operate as one program- Notating.pdf
Please use the code below and make it operate as one program- Notating.pdf
seoagam1
 
Please use the following table of data for the 4 questions that follow.pdf
Please use the following table of data for the 4 questions that follow.pdfPlease use the following table of data for the 4 questions that follow.pdf
Please use the following table of data for the 4 questions that follow.pdf
seoagam1
 
Ad

Recently uploaded (20)

How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 WebsiteHow to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 Website
Celine George
 
Letter to Secretary Linda McMahon from U.S. Senators
Letter to Secretary Linda McMahon from U.S. SenatorsLetter to Secretary Linda McMahon from U.S. Senators
Letter to Secretary Linda McMahon from U.S. Senators
Mebane Rash
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-17-2025 .pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-17-2025  .pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-17-2025  .pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-17-2025 .pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdfIPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
IPL QUIZ | THE QUIZ CLUB OF PSGCAS | 2025.pdf
Quiz Club of PSG College of Arts & Science
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 
PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
Conditions for Boltzmann Law – Biophysics Lecture Slide
Conditions for Boltzmann Law – Biophysics Lecture SlideConditions for Boltzmann Law – Biophysics Lecture Slide
Conditions for Boltzmann Law – Biophysics Lecture Slide
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
ITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQ
SONU HEETSON
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
The History of Kashmir Lohar Dynasty NEP.ppt
The History of Kashmir Lohar Dynasty NEP.pptThe History of Kashmir Lohar Dynasty NEP.ppt
The History of Kashmir Lohar Dynasty NEP.ppt
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit..."Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
AlionaBujoreanu
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
INDIA QUIZ FOR SCHOOLS | THE QUIZ CLUB OF PSGCAS | AUGUST 2024
INDIA QUIZ FOR SCHOOLS | THE QUIZ CLUB OF PSGCAS | AUGUST 2024INDIA QUIZ FOR SCHOOLS | THE QUIZ CLUB OF PSGCAS | AUGUST 2024
INDIA QUIZ FOR SCHOOLS | THE QUIZ CLUB OF PSGCAS | AUGUST 2024
Quiz Club of PSG College of Arts & Science
 
How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
How to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 WebsiteHow to Configure Extra Steps During Checkout in Odoo 18 Website
How to Configure Extra Steps During Checkout in Odoo 18 Website
Celine George
 
Letter to Secretary Linda McMahon from U.S. Senators
Letter to Secretary Linda McMahon from U.S. SenatorsLetter to Secretary Linda McMahon from U.S. Senators
Letter to Secretary Linda McMahon from U.S. Senators
Mebane Rash
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 
PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
ITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQITI COPA Question Paper PDF 2017 Theory MCQ
ITI COPA Question Paper PDF 2017 Theory MCQ
SONU HEETSON
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit..."Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
"Bridging Cultures Through Holiday Cards: 39 Students Celebrate Global Tradit...
AlionaBujoreanu
 
Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............Peer Assesment- Libby.docx..............
Peer Assesment- Libby.docx..............
19lburrell
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
Ad

Please help me to make a programming project I have to sue them today- (1).pdf

  • 1. Please help me to make a programming project I have to sue them today. Please help me make a UnsortedList and SortedList classes. The instructor give me The code of the List and AbstracList Classes that 2 pages we do not modify them. Do not modify this pages!!! List.java import java.util.Iterator; /** * Represents List interface. * * @author Varik Hoang * @version Sep 26, 2016 * @param is of any object type. */ public interface List { /** * The method returns the current number of elements in the list. * * @return the current number of elements in the list greater than or equal 0 */ public int getSize(); /** * The method returns whether the list is empty. * * @return true if list is empty, false otherwise. */ public boolean isEmpty(); /** * The method returns whether value is in the list. * * @param value the value is assigned * @return true if value in the list, false otherwise. */ public boolean contains(Type value); /** * The method inserts an element into the list. * * @param value the value is assigned */ public void insert(Type value); /** * The method clears the list. */ public void clear(); /** * The method returns a string representation of list contents. * * @return a string representation of list contents. * @see Object#toString() */ @Override public String toString(); /** * /** * The method removes first element occurrence from the list. * * @param value the value is assigned * @return the removed value */ public Type remove(Type value); /** * The method returns the index of value. * * @param value the value is assigned. * @return the index of value if in the list, -1 otherwise. */ public int getIndex(Type value); /** * The method removes value at the given index. * * @param index the index must be in range of 0 and size * @return the removed value * @throws IndexOutOfBoundsException if index less than 0 or index greater than * or equal size */ public Type removeAtIndex(int index); /** * The method replaces the value at the given index with the given value. * * @param index the index must be in range of 0 and size * @param value the value is assigned * @throws IndexOutOfBoundsException if index less 0 or index greater than size */ public void set(int index, Type value); /** * Returns the value at the given index in the list. * * @param index the index must be in range of 0 and size * @throws IndexOutOfBoundsException if index less than 0 or greater size * @return the value at the given index in the list. */ public Type get(int index); /** * The method returns an iterator for this list. * * @return an iterator for the list. */ public Iterator iterator(); } Do not modify this pages public abstract class AbstractList implements List { /** * The reference to the last element */ protected ListNode tail; /** * The size of the list */ protected int size; /** * The constructor that initiate the tail and size references */ public AbstractList() { tail = null; size = 0; } @Override public int getSize() { return size; } @Override public boolean isEmpty() { return size == 0; } @Override public int getIndex(final Type value) { if (value == null) throw new NullPointerException("The value could not be null"); if (tail == null) return -1; ListNode current = tail.next; // point to head for (int index = 0; index < size; index++) { if (current.data.equals(value)) return index; current = current.next; } return -1; } @Override public String toString() { if (size == 0) return "[]"; StringBuilder builder = new StringBuilder(); builder.append("["); ListNode current = tail.next; // head node while (current != tail) { builder.append(current.data).append(",").append(" "); current = current.next; } builder.append(tail.data); builder.append("]"); return builder.toString(); } /** * Returns an iterator for this list. * * @return an iterator for the list. */ public Iterator iterator() { return new LinkedIterator(); } /** * Represents a list node. * * @author Building Java Programs 3rd ed. * @param is of any object type */ protected static class ListNode { /** * Data stored in this node. */ public final Type data; /** * Link to next node in the list. */ public ListNode next; /** * Constructs a node with given data and a null link. * * @param data assigned */ public ListNode(Type data) { this(data, null); } /** * Constructs a node with given data and given link. * * @param data assigned * @param next assigned */ public ListNode(Type data, ListNode
  • 2. next) { this.data = data; this.next = next; } /** * The method returns the generic data type as string */ public String toString() { return this.data.toString(); } } /** * The iterator class for the list. * * @author modified from BuildingJavaPrograms 3rd Edition */ public class LinkedIterator implements Iterator { /** * Location of current value to return. */ private ListNode current; /** * The flag that tells if the first node has been visited. */ private boolean visited; /** * Constructs an iterator for the given list. */ public LinkedIterator() { reset(); } /** * Returns whether there are more list elements. * * @return true if there are more elements left, false otherwise * @see java.util.Iterator#hasNext() */ public boolean hasNext() { if (tail != null) return !(current == tail.next && visited); else return false; } /** * Returns the next element in the iteration. * * @throws NoSuchElementException if no more elements. * @return the next element in the iteration. * @see java.util.Iterator#next() */ public Type next() { if (!hasNext()) { throw new NoSuchElementException(); } Type result = current.data; current = current.next; visited = true; return result; } /** * This method is not supported */ public void remove() { throw new IllegalStateException("This iterator does not support remove operation"); } /** * The method resets back to the beginning. */ public final void reset() { if (tail != null) current = tail.next; visited = false; } } } Now you must only use the Todo tags to implement the methods for Both Sorted and UnsortedList classes. Please compile with no errors! You can do sanity check below: please make sure you passed all the sanity check before you posted the answers. Thank you!!! http://18.224.94.128/course/index.php?contest=51&pass=1735
  翻译: