Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For excercise 14 the professor also asks for 3 other operations ( abstract methods) the might be useful to export from a StringLog ADT In

For excercise 14 the professor also asks for 3 other operations ( abstract methods) the might be useful to export from a StringLog ADT image text in transcribed
image text in transcribed
image text in transcribed
In this section we follow the same basic outline that we employed when describin array-based implementation, making it easy to compare and contrast the two impl the mentation approaches. Instance Variables this implementation, the elements of a Stringl.og are stored in a linked list In StringNode objects. The LLStringNode class was defined in Section 2.5. As we in the array-based approach, we call the instance variable that we use to access strings log. It will reference the first node on the linked list, so it is a referencee object of the class LLStringNode As with the array approach, we use a string variable called name to hold the r of the Stringlog. For the array-based approach we needed one additional instance able to keep track of the last position in the array that was being used. We do not to track that information for the linked approach, as we do not use indexes. The h ning of the class definition looks like this: // LinkedStringlog. java by Dale/Joyce/Weems Chapter / Implements StringLogInterface using a linked list 1 of LLStringNode to hold the log strings. package ch02.stringLogs: public class LinkedStringlog implements Stringloginterface protected LLStringNode log: I/ reference to first node of linked // list that holds the StringLog strin /I name of this StringLog protected String name: Constructors For the array-based approach we included two constructors: one in which of the array was specified as an argument and one in which it wasn't. Beca list is a dynamic structure that grows as about a size parameter. We need only a single constructor

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

=+5. How do proposal writers use an RFP? [LO-7]

Answered: 1 week ago