{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Section5-6Problems - CSE143 Section Enr t-haca n r n f l g...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE143 Section *F Problems '6 E n r t - h a c a n r n f l g 6 5 , a S S U m e t h a t w e a r e u s i n g t h e S t a n d a r d L i S t N O d e C I a S S : r - v public class ListNode t public int data; / / data stored in this node public ListNode next; / / Iink to next node in the Iist public ListNode O i this (0, nuII); ) public ListNode(int data) { t.his (data, nuLl-) i ) public ListNode(int data, ListNode next) { this . data data i ,. t.his.next : next; ) i Your task is to create a class called Linkedlntlist that has the same functionality as the Intlist class of handout #3 (minus the constructor that involves capacity, because linked Iists have no maximum capacity) In doing so, assume that you have a single data field of type ListNode called front: public class Linkedlntlist { private ListNode front; <methods> ) r\ie wrote the appending add method
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}