Question: solve in Java please. The Bag ADT is an abstraction of a multiset, i.e. a set where an item can be present in the bag

The Bag ADT is an abstraction of a multiset, i.e. a set where an item can be present in the bag more than once. Locations of items are not relevant in a bag, so operations such as removeltemAtt(int location) or retrieveltemAt(int location) are not allowed. Implement a Bag ADT using a linked list, as described in the UML class diagram and the instructions below. Guidelines The assignment is to be completed individually or in teams of two students. Questions are based on the content studied in class on list ADT, Bag ADT linked lists, and their variations. You are allowed to use all of the code given in the lectures. In those cases, make sure you properly credit its source. - Classes from the Java Collection Framework, e.g. java.util.LinkedList, are not allowed for use in your implementation. - Students are required to structure the code as indicated in the UML class diagrams. - Several files accompany this project description: - assignment 2 test set.txt: a test file, - Main.java: a complete implementation of the Main class (tests your code using file assignment 2 test set.txt), - LinkedBag.java: the framework of the LinkedBag class, with the constructor and the tostring method implemented, - Node.java: the framework of the Node class, - output.pdf: a file with the output generated by the Main class provided. - Students are required to use the given class frameworks included, completing all the methods as indicated in the Javadoc comment section of each method. - The tostring method provided is to be used in all output. - The output of your program is required to be the same as the output example provided
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
