Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Java) convert the array method in the code give below into a Linked LIst. ---- class StringList{ private int size; private int count; private String

(Java)

convert the array method in the code give below into a Linked LIst.

----

class StringList{ private int size; private int count; private String List[]; public StringList(){ this.size=10; List=new String[size]; count=0; } public StringList(int size){ this.size=size; List=new String[size]; count=0; } public boolean isEmpty(){ return count==0?true:false; } public boolean isFull(){ return count==size?true:false; } public int size(){ return count; } public void clear(){ count=0; } public String StringRetrieve(int position){ if(position<0||position>count){ throw new RuntimeException("Invalid Position"); } return List[position]; } public void StringReplace(String newStr,int position){ if(position<0||position>count){ throw new RuntimeException("Invalid Position"); } List[position] = newStr; } public void StringRemove(int position){ if(position<0||position>count){ throw new RuntimeException("Invalid Position"); } for(int i=position;isize){ throw new RuntimeException("Invalid Position"); } if(position==count){ List[position]=newStr; } else if(position

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions