every row in the sparse matrix does not necessarily contain elementswe must search for the first node this same operation will be required when advancing through the sparse matrix as we reach the end of each rowso we include the findnextelement(helper method to find the next node in the array of linked lists to find the next nodethe helper method starts at the current row and increments counter until the next non-empty row is found or all rows have been processed if the counter references non-empty rowcurnode is set to the first node in that list otherwiseit is set to nonewhich will signal the end of the traversal loop the next(method of the sparsematrixiterator class need only examine the curnode field to determine if the stopiteration exception should be raised or value is to be returned if curnode is not nullwe first save the value from the current node and then advance the reference to the next node in the list when reaching the end of the linked list representing the current rowthe findnextelement(must be called to search for the next non-empty row in the array of linked lists the operation concludes by returning the value saved before advancing curnode to the next node applicationtext editor if you have used computerit' very likely you have used text editor text editors allow us to enter text to create documents or to enter information into form fields like those found on some web pages editors can be very complex like word processor or rather simple like microsoft' notepad no matter the complexityall text editors must maintain and manage the text as the user entersdeletesand manipulates characters and lines in this sectionwe define an edit buffer adtwhich can be used by simple text editor to store and manage the text of document being manipulated by the actual editor the adt is defined independent of the text editor and only contains operations necessary for the storage and manipulation of plain text this adt is not meant to be used by more complex editors such as those that perform syntax highlighting or even by word processorswhich must also maintain character properties like font style and size we conclude with an implementation of our edit buffer adt and discuss other alternatives typical editor operations while the design and implementation of an actual text editor is beyond the scope of this textbookthe examination of an edit storage buffer is not we begin our discussion by examining the workings of typical text editors that will aide in the design of our adt