{"id":23042,"date":"2022-01-05T10:45:19","date_gmt":"2022-01-05T10:45:19","guid":{"rendered":"https:\/\/assignmenttutors.net\/blog\/java-homework-computer-science-homework-help\/"},"modified":"2022-01-05T10:45:19","modified_gmt":"2022-01-05T10:45:19","slug":"java-homework-computer-science-homework-help","status":"publish","type":"post","link":"https:\/\/assignmenttutors.net\/blog\/java-homework-computer-science-homework-help\/","title":{"rendered":"Java homework | Computer Science homework help"},"content":{"rendered":"<div>\n<p>\u00a0<\/p>\n<p>Exercise 24.3: (pg no. \u00a0971)<\/p>\n<p>\u00a0(Implement a doubly linked list) The MyLinkedList class used in Listing 24.5 is<\/p>\n<p>a one-way directional linked list that enables one-way traversal of the list. Modify<\/p>\n<p>the Node class to add the new data field name previous to refer to the previous<\/p>\n<p>node in the list, as follows:<\/p>\n<p>public class Node&lt;E&gt; {<\/p>\n<p>E element;<\/p>\n<p>Node&lt;E&gt; next;<\/p>\n<p>Node&lt;E&gt; previous;<\/p>\n<p>public Node(E e) {<\/p>\n<p>element = e;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Implement a new class named TwoWayLinkedList that uses a doubly linked list<\/p>\n<p>to store elements. Define TwoWayLinkedList to implements MyList. You need<\/p>\n<p>to implement all the methods defined in MyLinkedList as well as the methods<\/p>\n<p>listIterator() and listIterator(int index). Both return an instance of<\/p>\n<p>java.util.ListIterator&lt;E&gt; (see Figure 20.4). The former sets the cursor to<\/p>\n<p>the head of the list and the latter to the element at the specified index.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Exercise 24.3: (pg no. \u00a0971) \u00a0(Implement a doubly linked list) The MyLinkedList class used in Listing 24.5 is a one-way directional linked list that enables one-way traversal of the list. Modify the Node class to add the new data field name previous to refer to the previous node in the list, as follows: public [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-23042","post","type-post","status-publish","format-standard","hentry","category-education"],"_links":{"self":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/23042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/comments?post=23042"}],"version-history":[{"count":0,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/23042\/revisions"}],"wp:attachment":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/media?parent=23042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/categories?post=23042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/tags?post=23042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}