Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use TDD to implement a linked list data structure class. You will write a java program lListTester.java and a class lList. The class should be

use TDD to implement a linked list data structure class. You will write a java program lListTester.java and a class lList. The class should be developed by TDD methods. image text in transcribed

ximplementation class IList +info string +nextList List tis Empty bo +insert +next List(): IList +ISize nt +delete Info +traverse() string The behaviors are as follows: is Empty() return true if IList is empty, i e. info is null and nextList is null. insert (ininfo) returns nothing. Place inlnfo into IList as a new IList at the beginning of the current IList. Given the following IList: insert("G") would produce: nextList() returns IList. If the current list is not empty, it returns a reference to the beginning of the remaining list. If the current list is empty it returns null. If the current list references "G" then this.nextList() would return a reference to "F". If the current list is empty (V) then this nextList() would return null. ISize() returns an integer which counts the number of none-empty sublists in the current list +1. If this references "G" then this. ISize() would return 3. If this references "F" then this.ISize() would return 2/ lf this references then this.ISize() would return 0. deletelnfo(outInfo) returns a reference to the start of the list following the information removed if it then deletelnfo("F") would result in exists. If the linked list is the following linked list G deletelnfo("Z") would change nothing. traverse() returns a string which is the current natural order of the linked list as a comma separated set of strings. Given the linked list, LG F traverse() would return "G, F, A

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

More Books

Students also viewed these Databases questions

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago