Question: (Translate into Java Eclipse code) cinterface List Element) hoolean .remove(Elembelea .getElement Element Abstract Element me : Suing element courtint - InfoString elements Collection name: Sering
(Translate into Java Eclipse code)

cinterface List Element) hoolean .remove(Elembelea .getElement Element Abstract Element me : Suing element courtint - InfoString elements Collection name: Sering Collectioning, in addlistestractist) boolean remove Abstract:boolean + addToListAbstractist Element) boolean * removeFromtist(Abstractist Element boolean +reverselvold counts Element .toString Sing + Abstract String, Inc equals(Object) hoolean toString Sering + Elemento Element String (Object bootan .toString String UniqueList Ordinary + Unique Suring. In +reverse void Ordinary string, countlement) Element class: Attributes: o id: the id of the element o info: the info of the element Methods: o Element(): default constructor o Element(int id, String info): constructor o equals(Object other): compares two objects of type Element based on their id and returns the result of the equality otoString(): returns a string representing the element List interface: . Methods: add(Element e): adds e to the list in the following ways: UniqueList: adds e if there's space and it isn't already on the list OrdinaryList: adds e if there's space o remove(Element e): removes e from the list in the following ways: Unique List: removes e if it's in the list while maintaining the order OrdinaryList: removes e if it exists in the list and replaces it with the last element if possible o getElement(int index): returns the element at index if possible AbstractList class: Attributes: o name: the name of the list Methods: AbstractList(String name, int size): constructor o equals(Object other): compares two objects of type AbstractList based on their name and returns the result of the equality toString(: returns a string representing the list and its elements UniqueList class: . Methods: o UniqueList(String name, int size): constructor reverse(): reverses the order of the elements in the list. Example:(1", 20, 3", ..., ith ith, i-Ith, i-2th, ..., 1") do this in-place Ordinary List class: Methods: o OrdinaryList(String name, int size): constructor o count(Element e): returns the number of occurrences of the element e in the list Collection class: Attributes: o name: the name of the collection Methods: o Collection(String name, int size): constructor o addList(AbstractList 1): adds the list to the collection if there's space and it's not already there o removeList(AbstractList 1): removes the list / from the collection if it is in the collection and replaces it with the last list o addToList(AbstractList I. Element e): adds e to list / o removeFromList(AbstractList 1, Element e): removes e from the list if possible reverse Allo: reverses all the unique lists in the collection count All(Element e): returns the number of occurrences of the elemente in all the ordinary lists in the collection otoString(): returns a string representing the collection and its lists Exercise 1: Translate into Java code all the previous classes & interfaces. Exercise 2: Write a main method and test all the previous functionalities
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
