SlideShare uma empresa Scribd logo
1 de 2
Please complete all the code as per instructions in Java programming import org.w3c.dom.Node;
import javax.xml.crypto.NodeSetData; import java.awt.*; import java.util.Iterator; import
java.util.NoSuchElementException; /** * This class implements an acyclic (non-cyclic), doubly-
linked list. * @param */ public class CiscDoublyLinkedList implements CiscList { /** * A
reference to the first node in the list (or null if list is empty). */ private Node head; /** * A
reference to the last node int the list (or null if list is empty). */ private Node tail; /** * Number
of elements in the list. */ private int size; /** * Returns the number of elements in this list. * * *
@return the number of elements in this list */ @Override public int size() { return size; } /** *
Returns {@code true} if this list contains no elements. * * * @return {@code true} if this list
contains no elements */ @Override public boolean isEmpty() { if (size == 0){ return true; }
return false; } /** * Returns {@code true} if this list contains the specified element (compared
using the {@code equals} method). * * * @param o element whose presence in this list is to be
tested * @return {@code true} if this list contains the specified element * @throws
NullPointerException if the specified element is null */ @Override public boolean
contains(Object o) { if(o == null) { throw new NullPointerException(); } Node node = head;
while(node != null) { if(node.data.equals(o)){ return true; } node = node.next; } return false; }
/** * Returns the index of the first occurrence of the specified element in this list, or -1 if this list
does not * contain the element (compared using the {@code equals} method). * * * @param o
element to search for * @return the index of the first occurrence of the specified element in this
list, or -1 if this list does not * contain the element * @throws NullPointerException if the
specified element is null */ @Override public int indexOf(Object o) { if (o == null){ throw new
NullPointerException(); } for(int i =0; i = size){ throw new IndexOutOfBoundsException(); }
return null; } /** * Appends the specified element to the end of this list. * * *
Lists may place the specified element at arbitrary locations if desired. In particular, an ordered
list will * insert the specified element at its sorted location. List classes should clearly specify in
their documentation * how elements will be added to the list if different from the default
behavior (end of this list). * * @param e element to be appended to this list * @return {@code
true} * @throws NullPointerException if the specified element is null */ @Override public
boolean add(E e) { if(e == null){ throw new NullPointerException(); } return false; } /** *
Replaces the element at the specified position in this list with the specified element. * * *
@param index index of the element to replace * @param element element to be stored at the
specified position * @return the element previously at the specified position * @throws
NullPointerException if the specified element is null * @throws IndexOutOfBoundsException if
the index is out of range */ @Override public E set(int index, E element) { if (element == null){
throw new NullPointerException(); } if (index<0 || index>=size){ throw new
IndexOutOfBoundsException(); } return null; } /** * Returns an array containing all of the
elements in this list in proper sequence (from first to last element). * * *
The returned array will be "safe" in that no references to it are maintained by this list. (In other
words, * this method must allocate a new array even if this list is backed by an array). The caller
is thus free to modify * the returned array. * * @return an array containing all of the elements in
this list in proper sequence */ @Override public Object[] toArray() { Object[] array = (Object[])
new Object[size]; int index = 0; for (Node node = head; node!=null;){ array[index] = node;
index++; } return array; } /** * Removes the first occurrence of the specified element from this
list, if it is present. If this list does not * contain the element, it is unchanged. Returns {@code
true} if this list contained the specified element. * * * @param o element to be removed from
this list, if present * @return {@code true} if this list contained the specified element * @throws
NullPointerException if the specified element is null */ @Override public boolean
remove(Object o) { if (o == null){ throw new NullPointerException(); } return false; } /** *
Removes the element at the specified position in this list. Shifts any subsequent elements to the
left * (subtracts one from their indices). Returns the element that was removed from the list. * *
* @param index the index of the element to be removed * @return the element previously at the
specified position * @throws IndexOutOfBoundsException if the index is out of range */
@Override public E remove(int index) { if (index<0 || index>=size){ throw new
IndexOutOfBoundsException(); } return null; } /** * Inserts the specified element at the
specified position in this list. Shifts the element * currently at that position (if any) and any
subsequent elements to the right (adds one to their indices). * * * @param index index at which
the specified element is to be inserted * @param element element to be inserted * @throws
NullPointerException if the specified element is null * @throws IndexOutOfBoundsException if
the index is out of range */ @Override public void add(int index, E element) { if (element ==
null){ throw new NullPointerException(); } if (index<0 || index >= size){ throw new
IndexOutOfBoundsException(); } } /** * Appends all elements in the specified list to the end of
this list, in the order that they are returned by the * specified list's iterator. * * * @param c list
containing elements to be added to this list * @return {@code true} if this list changed as a
result of the call * @throws NullPointerException if the specified list is null */ @Override public
boolean addAll(CiscList extends E> c) { return false; } /** * Returns an iterator over the
elements in this list in proper sequence. * * * @return an iterator over the elements in this list in
proper sequence */ @Override public Iterator iterator() { return null; } private static class
CiscDoublyLinkedListIterator implements Iterator { /** * A reference to the node containing the
next element to return. */ private Node nextNode; /** * Constructs an iterator beginning at the
specified node. */ public CiscDoublyLinkedListIterator(Node head) { } /** * Returns {@code
true} if the iteration has more elements. * (In other words, returns {@code true} if {@link
#next} would * return an element rather than throwing an exception.) * * @return {@code true}
if the iteration has more elements */ @Override public boolean hasNext() { return false; } /** *
Returns the next element in the iteration. * * @return the next element in the iteration * @throws
NoSuchElementException if the iteration has no more elements */ @Override public E next() {
return null; } } private static class Node { private E data; private Node next; private Node prev;
private Node(E data, Node next, Node prev) { this.data = data; this.next = next; this.prev = prev;
} } }

Mais conteúdo relacionado

Semelhante a Please complete all the code as per instructions in Java programming.docx

we using java code DynamicArrayjava Replace all .pdf
we using java code   DynamicArrayjava   Replace all .pdfwe using java code   DynamicArrayjava   Replace all .pdf
we using java code DynamicArrayjava Replace all .pdfgudduraza28
 
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.pdfmaheshkumar12354
 
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; .pdfdeepakangel
 
we using java dynamicArray package modellinearpub imp.pdf
we using java dynamicArray    package modellinearpub   imp.pdfwe using java dynamicArray    package modellinearpub   imp.pdf
we using java dynamicArray package modellinearpub imp.pdfadityagupta3310
 
package linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdfpackage linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdfarcellzone
 
please read the steps below and it will tell you what we usi.pdf
please read the steps below and it will tell you what we usi.pdfplease read the steps below and it will tell you what we usi.pdf
please read the steps below and it will tell you what we usi.pdfaggarwalopticalsco
 
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.pdfmalavshah9013
 
Please do parts labeled TODO LinkedList.java Replace.pdf
Please do parts labeled TODO LinkedList.java Replace.pdfPlease do parts labeled TODO LinkedList.java Replace.pdf
Please do parts labeled TODO LinkedList.java Replace.pdfaioils
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfaccostinternational
 
please read below it will tell you what we are using L.pdf
please read below it will tell you what we are using   L.pdfplease read below it will tell you what we are using   L.pdf
please read below it will tell you what we are using L.pdfankit11134
 
Given below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfGiven below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfinfo430661
 
A popular implementation of List is ArrayList- Look up how to instanti.pdf
A popular implementation of List is ArrayList- Look up how to instanti.pdfA popular implementation of List is ArrayList- Look up how to instanti.pdf
A popular implementation of List is ArrayList- Look up how to instanti.pdfarsarees
 
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 .pdffantasiatheoutofthef
 
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
 
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
 
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdfImplement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdfrishabjain5053
 
Java Foundations StackADT-java --- - Defines the interface to a stack.docx
Java Foundations StackADT-java ---  - Defines the interface to a stack.docxJava Foundations StackADT-java ---  - Defines the interface to a stack.docx
Java Foundations StackADT-java --- - Defines the interface to a stack.docxVictorXUQGloverl
 
package ADTs public interface CollectionADTltTgt .pdf
package ADTs public interface CollectionADTltTgt      .pdfpackage ADTs public interface CollectionADTltTgt      .pdf
package ADTs public interface CollectionADTltTgt .pdfsyedabdul78662
 
1 The goal is to implement DataStructuresArrayStack accor.pdf
1 The goal is to implement DataStructuresArrayStack accor.pdf1 The goal is to implement DataStructuresArrayStack accor.pdf
1 The goal is to implement DataStructuresArrayStack accor.pdfsaradashata
 
Describe an algorithm for concatenating two singly linked lists L and.pdf
Describe an algorithm for concatenating two singly linked lists L and.pdfDescribe an algorithm for concatenating two singly linked lists L and.pdf
Describe an algorithm for concatenating two singly linked lists L and.pdfdeepak596396
 

Semelhante a Please complete all the code as per instructions in Java programming.docx (20)

we using java code DynamicArrayjava Replace all .pdf
we using java code   DynamicArrayjava   Replace all .pdfwe using java code   DynamicArrayjava   Replace all .pdf
we using java code DynamicArrayjava Replace all .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
 
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
 
we using java dynamicArray package modellinearpub imp.pdf
we using java dynamicArray    package modellinearpub   imp.pdfwe using java dynamicArray    package modellinearpub   imp.pdf
we using java dynamicArray package modellinearpub imp.pdf
 
package linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdfpackage linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdf
 
please read the steps below and it will tell you what we usi.pdf
please read the steps below and it will tell you what we usi.pdfplease read the steps below and it will tell you what we usi.pdf
please read the steps below and it will tell you what we usi.pdf
 
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
 
Please do parts labeled TODO LinkedList.java Replace.pdf
Please do parts labeled TODO LinkedList.java Replace.pdfPlease do parts labeled TODO LinkedList.java Replace.pdf
Please do parts labeled TODO LinkedList.java Replace.pdf
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdf
 
please read below it will tell you what we are using L.pdf
please read below it will tell you what we are using   L.pdfplease read below it will tell you what we are using   L.pdf
please read below it will tell you what we are using L.pdf
 
Given below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdfGiven below is the completed implementation of MyLinkedList class. O.pdf
Given below is the completed implementation of MyLinkedList class. O.pdf
 
A popular implementation of List is ArrayList- Look up how to instanti.pdf
A popular implementation of List is ArrayList- Look up how to instanti.pdfA popular implementation of List is ArrayList- Look up how to instanti.pdf
A popular implementation of List is ArrayList- Look up how to instanti.pdf
 
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
 
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
 
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
 
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdfImplement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
 
Java Foundations StackADT-java --- - Defines the interface to a stack.docx
Java Foundations StackADT-java ---  - Defines the interface to a stack.docxJava Foundations StackADT-java ---  - Defines the interface to a stack.docx
Java Foundations StackADT-java --- - Defines the interface to a stack.docx
 
package ADTs public interface CollectionADTltTgt .pdf
package ADTs public interface CollectionADTltTgt      .pdfpackage ADTs public interface CollectionADTltTgt      .pdf
package ADTs public interface CollectionADTltTgt .pdf
 
1 The goal is to implement DataStructuresArrayStack accor.pdf
1 The goal is to implement DataStructuresArrayStack accor.pdf1 The goal is to implement DataStructuresArrayStack accor.pdf
1 The goal is to implement DataStructuresArrayStack accor.pdf
 
Describe an algorithm for concatenating two singly linked lists L and.pdf
Describe an algorithm for concatenating two singly linked lists L and.pdfDescribe an algorithm for concatenating two singly linked lists L and.pdf
Describe an algorithm for concatenating two singly linked lists L and.pdf
 

Mais de cgraciela1

PLEASE HELP The above table shows the annual incomes of individuals.docx
PLEASE HELP   The above table shows the annual incomes of individuals.docxPLEASE HELP   The above table shows the annual incomes of individuals.docx
PLEASE HELP The above table shows the annual incomes of individuals.docxcgraciela1
 
Please give examples on all of the following titles and solve them as.docx
Please give examples on all of the following titles and solve them as.docxPlease give examples on all of the following titles and solve them as.docx
Please give examples on all of the following titles and solve them as.docxcgraciela1
 
please give the answer please give the answer A product's life cycl.docx
please give the answer please give the answer    A product's life cycl.docxplease give the answer please give the answer    A product's life cycl.docx
please give the answer please give the answer A product's life cycl.docxcgraciela1
 
please give a details explanation- i tried but i keep getting erronou.docx
please give a details explanation-  i tried but i keep getting erronou.docxplease give a details explanation-  i tried but i keep getting erronou.docx
please give a details explanation- i tried but i keep getting erronou.docxcgraciela1
 
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docx
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docxPlease explain- Thank you! 3- Show intermediate steps of sorting the a.docx
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docxcgraciela1
 
Please explain why the answer is B instead of D 5- Which of the follow.docx
Please explain why the answer is B instead of D 5- Which of the follow.docxPlease explain why the answer is B instead of D 5- Which of the follow.docx
Please explain why the answer is B instead of D 5- Which of the follow.docxcgraciela1
 
Please Drawing this numbers using python Draw these follow.docx
Please Drawing this numbers using python             Draw these follow.docxPlease Drawing this numbers using python             Draw these follow.docx
Please Drawing this numbers using python Draw these follow.docxcgraciela1
 
PLEASE don't copy and paste from a previous answer because it was inco.docx
PLEASE don't copy and paste from a previous answer because it was inco.docxPLEASE don't copy and paste from a previous answer because it was inco.docx
PLEASE don't copy and paste from a previous answer because it was inco.docxcgraciela1
 
Please draw concept map Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docx
Please draw concept map    Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docxPlease draw concept map    Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docx
Please draw concept map Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docxcgraciela1
 
Please dont copy paste a-What is customer service- b- Main theories o.docx
Please dont copy paste a-What is customer service-  b- Main theories o.docxPlease dont copy paste a-What is customer service-  b- Main theories o.docx
Please dont copy paste a-What is customer service- b- Main theories o.docxcgraciela1
 
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docx
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docxPLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docx
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docxcgraciela1
 
Please do this for me!! I would gladly appreciate it- Write one result.docx
Please do this for me!! I would gladly appreciate it- Write one result.docxPlease do this for me!! I would gladly appreciate it- Write one result.docx
Please do this for me!! I would gladly appreciate it- Write one result.docxcgraciela1
 
Please copy and paste the code and explain why it won't work- It is su.docx
Please copy and paste the code and explain why it won't work- It is su.docxPlease copy and paste the code and explain why it won't work- It is su.docx
Please copy and paste the code and explain why it won't work- It is su.docxcgraciela1
 
Please code in C language- Please do part 1 and 2- Do not recycle answ.docx
Please code in C language- Please do part 1 and 2- Do not recycle answ.docxPlease code in C language- Please do part 1 and 2- Do not recycle answ.docx
Please code in C language- Please do part 1 and 2- Do not recycle answ.docxcgraciela1
 
please ask and answer questions in internet technologies in the follo.docx
please ask and answer questions in  internet technologies in the follo.docxplease ask and answer questions in  internet technologies in the follo.docx
please ask and answer questions in internet technologies in the follo.docxcgraciela1
 
Please answer the multiple choice questions with detailed explanation.docx
Please answer the multiple choice questions with detailed explanation.docxPlease answer the multiple choice questions with detailed explanation.docx
Please answer the multiple choice questions with detailed explanation.docxcgraciela1
 
Please answer the following questions about the network of streets in.docx
Please answer the following questions about the network of streets in.docxPlease answer the following questions about the network of streets in.docx
Please answer the following questions about the network of streets in.docxcgraciela1
 
Please answer 16-29- thank you P4- Dissection of the Fetal Pig Ventr.docx
Please answer 16-29- thank you   P4- Dissection of the Fetal Pig Ventr.docxPlease answer 16-29- thank you   P4- Dissection of the Fetal Pig Ventr.docx
Please answer 16-29- thank you P4- Dissection of the Fetal Pig Ventr.docxcgraciela1
 
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docx
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docxPlease answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docx
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docxcgraciela1
 
Please answer the 4 questions using C- The expected output is shown be.docx
Please answer the 4 questions using C- The expected output is shown be.docxPlease answer the 4 questions using C- The expected output is shown be.docx
Please answer the 4 questions using C- The expected output is shown be.docxcgraciela1
 

Mais de cgraciela1 (20)

PLEASE HELP The above table shows the annual incomes of individuals.docx
PLEASE HELP   The above table shows the annual incomes of individuals.docxPLEASE HELP   The above table shows the annual incomes of individuals.docx
PLEASE HELP The above table shows the annual incomes of individuals.docx
 
Please give examples on all of the following titles and solve them as.docx
Please give examples on all of the following titles and solve them as.docxPlease give examples on all of the following titles and solve them as.docx
Please give examples on all of the following titles and solve them as.docx
 
please give the answer please give the answer A product's life cycl.docx
please give the answer please give the answer    A product's life cycl.docxplease give the answer please give the answer    A product's life cycl.docx
please give the answer please give the answer A product's life cycl.docx
 
please give a details explanation- i tried but i keep getting erronou.docx
please give a details explanation-  i tried but i keep getting erronou.docxplease give a details explanation-  i tried but i keep getting erronou.docx
please give a details explanation- i tried but i keep getting erronou.docx
 
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docx
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docxPlease explain- Thank you! 3- Show intermediate steps of sorting the a.docx
Please explain- Thank you! 3- Show intermediate steps of sorting the a.docx
 
Please explain why the answer is B instead of D 5- Which of the follow.docx
Please explain why the answer is B instead of D 5- Which of the follow.docxPlease explain why the answer is B instead of D 5- Which of the follow.docx
Please explain why the answer is B instead of D 5- Which of the follow.docx
 
Please Drawing this numbers using python Draw these follow.docx
Please Drawing this numbers using python             Draw these follow.docxPlease Drawing this numbers using python             Draw these follow.docx
Please Drawing this numbers using python Draw these follow.docx
 
PLEASE don't copy and paste from a previous answer because it was inco.docx
PLEASE don't copy and paste from a previous answer because it was inco.docxPLEASE don't copy and paste from a previous answer because it was inco.docx
PLEASE don't copy and paste from a previous answer because it was inco.docx
 
Please draw concept map Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docx
Please draw concept map    Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docxPlease draw concept map    Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docx
Please draw concept map Cdc45 Cdc6 Cdt1 Clamp Clamp loader CMG comp.docx
 
Please dont copy paste a-What is customer service- b- Main theories o.docx
Please dont copy paste a-What is customer service-  b- Main theories o.docxPlease dont copy paste a-What is customer service-  b- Main theories o.docx
Please dont copy paste a-What is customer service- b- Main theories o.docx
 
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docx
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docxPLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docx
PLEASE DONT COPY ANSWER Draw a DFA that accepts the strings that repre.docx
 
Please do this for me!! I would gladly appreciate it- Write one result.docx
Please do this for me!! I would gladly appreciate it- Write one result.docxPlease do this for me!! I would gladly appreciate it- Write one result.docx
Please do this for me!! I would gladly appreciate it- Write one result.docx
 
Please copy and paste the code and explain why it won't work- It is su.docx
Please copy and paste the code and explain why it won't work- It is su.docxPlease copy and paste the code and explain why it won't work- It is su.docx
Please copy and paste the code and explain why it won't work- It is su.docx
 
Please code in C language- Please do part 1 and 2- Do not recycle answ.docx
Please code in C language- Please do part 1 and 2- Do not recycle answ.docxPlease code in C language- Please do part 1 and 2- Do not recycle answ.docx
Please code in C language- Please do part 1 and 2- Do not recycle answ.docx
 
please ask and answer questions in internet technologies in the follo.docx
please ask and answer questions in  internet technologies in the follo.docxplease ask and answer questions in  internet technologies in the follo.docx
please ask and answer questions in internet technologies in the follo.docx
 
Please answer the multiple choice questions with detailed explanation.docx
Please answer the multiple choice questions with detailed explanation.docxPlease answer the multiple choice questions with detailed explanation.docx
Please answer the multiple choice questions with detailed explanation.docx
 
Please answer the following questions about the network of streets in.docx
Please answer the following questions about the network of streets in.docxPlease answer the following questions about the network of streets in.docx
Please answer the following questions about the network of streets in.docx
 
Please answer 16-29- thank you P4- Dissection of the Fetal Pig Ventr.docx
Please answer 16-29- thank you   P4- Dissection of the Fetal Pig Ventr.docxPlease answer 16-29- thank you   P4- Dissection of the Fetal Pig Ventr.docx
Please answer 16-29- thank you P4- Dissection of the Fetal Pig Ventr.docx
 
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docx
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docxPlease answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docx
Please answer the 3 questions- Case Study 2 Too Much Fatigue and Stres.docx
 
Please answer the 4 questions using C- The expected output is shown be.docx
Please answer the 4 questions using C- The expected output is shown be.docxPlease answer the 4 questions using C- The expected output is shown be.docx
Please answer the 4 questions using C- The expected output is shown be.docx
 

Último

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
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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.MaryamAhmad92
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
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.pdfAdmir Softic
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 

Último (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
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
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
 
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...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

Please complete all the code as per instructions in Java programming.docx

  • 1. Please complete all the code as per instructions in Java programming import org.w3c.dom.Node; import javax.xml.crypto.NodeSetData; import java.awt.*; import java.util.Iterator; import java.util.NoSuchElementException; /** * This class implements an acyclic (non-cyclic), doubly- linked list. * @param */ public class CiscDoublyLinkedList implements CiscList { /** * A reference to the first node in the list (or null if list is empty). */ private Node head; /** * A reference to the last node int the list (or null if list is empty). */ private Node tail; /** * Number of elements in the list. */ private int size; /** * Returns the number of elements in this list. * * * @return the number of elements in this list */ @Override public int size() { return size; } /** * Returns {@code true} if this list contains no elements. * * * @return {@code true} if this list contains no elements */ @Override public boolean isEmpty() { if (size == 0){ return true; } return false; } /** * Returns {@code true} if this list contains the specified element (compared using the {@code equals} method). * * * @param o element whose presence in this list is to be tested * @return {@code true} if this list contains the specified element * @throws NullPointerException if the specified element is null */ @Override public boolean contains(Object o) { if(o == null) { throw new NullPointerException(); } Node node = head; while(node != null) { if(node.data.equals(o)){ return true; } node = node.next; } return false; } /** * Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not * contain the element (compared using the {@code equals} method). * * * @param o element to search for * @return the index of the first occurrence of the specified element in this list, or -1 if this list does not * contain the element * @throws NullPointerException if the specified element is null */ @Override public int indexOf(Object o) { if (o == null){ throw new NullPointerException(); } for(int i =0; i = size){ throw new IndexOutOfBoundsException(); } return null; } /** * Appends the specified element to the end of this list. * * * Lists may place the specified element at arbitrary locations if desired. In particular, an ordered list will * insert the specified element at its sorted location. List classes should clearly specify in their documentation * how elements will be added to the list if different from the default behavior (end of this list). * * @param e element to be appended to this list * @return {@code true} * @throws NullPointerException if the specified element is null */ @Override public boolean add(E e) { if(e == null){ throw new NullPointerException(); } return false; } /** * Replaces the element at the specified position in this list with the specified element. * * * @param index index of the element to replace * @param element element to be stored at the specified position * @return the element previously at the specified position * @throws NullPointerException if the specified element is null * @throws IndexOutOfBoundsException if the index is out of range */ @Override public E set(int index, E element) { if (element == null){ throw new NullPointerException(); } if (index<0 || index>=size){ throw new IndexOutOfBoundsException(); } return null; } /** * Returns an array containing all of the elements in this list in proper sequence (from first to last element). * * * The returned array will be "safe" in that no references to it are maintained by this list. (In other words, * this method must allocate a new array even if this list is backed by an array). The caller is thus free to modify * the returned array. * * @return an array containing all of the elements in this list in proper sequence */ @Override public Object[] toArray() { Object[] array = (Object[]) new Object[size]; int index = 0; for (Node node = head; node!=null;){ array[index] = node; index++; } return array; } /** * Removes the first occurrence of the specified element from this list, if it is present. If this list does not * contain the element, it is unchanged. Returns {@code
  • 2. true} if this list contained the specified element. * * * @param o element to be removed from this list, if present * @return {@code true} if this list contained the specified element * @throws NullPointerException if the specified element is null */ @Override public boolean remove(Object o) { if (o == null){ throw new NullPointerException(); } return false; } /** * Removes the element at the specified position in this list. Shifts any subsequent elements to the left * (subtracts one from their indices). Returns the element that was removed from the list. * * * @param index the index of the element to be removed * @return the element previously at the specified position * @throws IndexOutOfBoundsException if the index is out of range */ @Override public E remove(int index) { if (index<0 || index>=size){ throw new IndexOutOfBoundsException(); } return null; } /** * Inserts the specified element at the specified position in this list. Shifts the element * currently at that position (if any) and any subsequent elements to the right (adds one to their indices). * * * @param index index at which the specified element is to be inserted * @param element element to be inserted * @throws NullPointerException if the specified element is null * @throws IndexOutOfBoundsException if the index is out of range */ @Override public void add(int index, E element) { if (element == null){ throw new NullPointerException(); } if (index<0 || index >= size){ throw new IndexOutOfBoundsException(); } } /** * Appends all elements in the specified list to the end of this list, in the order that they are returned by the * specified list's iterator. * * * @param c list containing elements to be added to this list * @return {@code true} if this list changed as a result of the call * @throws NullPointerException if the specified list is null */ @Override public boolean addAll(CiscList extends E> c) { return false; } /** * Returns an iterator over the elements in this list in proper sequence. * * * @return an iterator over the elements in this list in proper sequence */ @Override public Iterator iterator() { return null; } private static class CiscDoublyLinkedListIterator implements Iterator { /** * A reference to the node containing the next element to return. */ private Node nextNode; /** * Constructs an iterator beginning at the specified node. */ public CiscDoublyLinkedListIterator(Node head) { } /** * Returns {@code true} if the iteration has more elements. * (In other words, returns {@code true} if {@link #next} would * return an element rather than throwing an exception.) * * @return {@code true} if the iteration has more elements */ @Override public boolean hasNext() { return false; } /** * Returns the next element in the iteration. * * @return the next element in the iteration * @throws NoSuchElementException if the iteration has no more elements */ @Override public E next() { return null; } } private static class Node { private E data; private Node next; private Node prev; private Node(E data, Node next, Node prev) { this.data = data; this.next = next; this.prev = prev; } } }