Write an equals method for the LBList class. Return true if the lists have the same number of elements and the elements in each position of the lists are the same; otherwise return false. DO NOT USE ANY OTHER METHODS OF THE LBLIST CLASS.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

Write an equals method for the LBList class. Return true if the lists have the same number of elements and the elements in each position of the lists are the same; otherwise return false. DO NOT USE ANY OTHER METHODS OF THE LBLIST CLASS.

public class LBList<T> implements ListInterface<T>
fields:
protected LLNode<T> front;
protected LLNode<T> rear;
protected int numElements
protected boolean found;
protected int targetIndex;
protected LLNode<T> location;
protected LLNode<T> previous;
0;
Transcribed Image Text:public class LBList<T> implements ListInterface<T> fields: protected LLNode<T> front; protected LLNode<T> rear; protected int numElements protected boolean found; protected int targetIndex; protected LLNode<T> location; protected LLNode<T> previous; 0;
methods:
void add(int index, T element);
T set (int index, T newElement);
T get (int index);
int indexOf(T target);
T remove (int index);
boolean add (T element);
T get (T target);
boolean contains (T target);
boolean remove (T target);
boolean isFull();
boolean iSEmpty();
int size ();
Iterator<T> iterator ();
Transcribed Image Text:methods: void add(int index, T element); T set (int index, T newElement); T get (int index); int indexOf(T target); T remove (int index); boolean add (T element); T get (T target); boolean contains (T target); boolean remove (T target); boolean isFull(); boolean iSEmpty(); int size (); Iterator<T> iterator ();
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,