Question Description
Project 1 Abstract Data Type(ADT) BagAn ADT Bag is composed of a list of grocery items and a set of operations on the list. You may think of a grocery bagas an instance of the ADT Bag. A grocery bag contains a list of groceries. There is a set of operations that operate on thelist. For example, we can add an item, remove an item, count the number of items, check for a specific item, etc. In thisproject, you will design an ADT bag by following software development cycle including specification, design,implementation, test/debug, and documentation.Specification/Analysis:The ADT Bag must contain the following operations:• create an empty bag that can hold up to 100 items• add an item to the end of the list of this bag- insert(item)• remove the item at the end of this bag – removeLast()• remove an item at a random index from this bag – removeRandom()• get the index of the first occurrence of an item from this bag – get(a reference to an item)• get a reference to an item at position index of this bag(get(index)),• check how many items are there in this bag – size()• check to see if this bag is empty – isEmpty()• empty this bag – makeEmpty()