Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Overview -The purpose of this lab is to create and use generic classes. The vehi

ID: 3681495 • Letter: O

Question

Overview
-The purpose of this lab is to create and use generic classes. The vehicle for the generic classes will be to use Linked Lists UML
UML for Node in file Node.java
Node<E>
-data:E
-link: Node<E>
+Node(initialData: E, initialLink: Node
<E>)
+ getData():E
+ getLink():Node
<E>
+ setData(initialData:E):void
+ setLink(initialLink : Node
<E>):void
UML for LinkedBag in file LinkedBag.java
LinkedBag
<E>
-head: Node
<E>
-numElements:int
+ LinkedBag( )
+ getSize():int
+ add(element : E):void
+ countOccurrences(target: E): int
+ exists(target: E): boolean
+ remove(target: E): boolean
+ toString( ) : String

Sample Run of TestLinkedBagCar.java

Display Bag on startup

Bag is empty Display Bag after adds
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 Expedition] is not in the bag
[Car 1994 expLorer] is in the bag
[Car 2015 acura] is in the bag
[Car 2015 honda ACcord] is in the bag
[Car 1965 Shelby Mustang GT 350] is in the bag
[Car 2015 Zoom Zoom] is in the bag

Display Bag after searches
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

number of [Car 1994 Expedition] in bag? 0
number of [Car 1994 expLorer] in bag? 1
number of [Car 2015 acura] in bag? 1
number of [Car 2015 honda ACcord] in bag? 1
number of [Car 1965 Shelby Mustang GT 350] in bag? 1
number of [Car 2015 Zoom Zoom] in bag? 2

Display Bag after counts
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 Expedition] is stated as not in the bag - remove failed -value indeed gone from bag
Display Bag after trying to remove: [Car 1994 Expedition], [Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 expLorer] stated as removed from bag -value indeed gone from bag - good
Display Bag after trying to remove: [Car 1994 expLorer], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 7

[Car 2015 acura] stated as removed from bag -value indeed gone from bag - good
Display Bag after trying to remove: [Car 2015 acura], [Car 2007 Neon], [Car 1965 Shelby Mustang GT 350], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 6

[Car 2015 honda ACcord] stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: [Car 2015 honda ACcord], [Car 1965 Shelby Mustang GT 350], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2007 Neon]
Size: 5

Sample Run of TestLinkedBagInteger.java

Display Bag on startup

Bag is empty

Display Bag after adds
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

66 is not in the bag
57 is in the bag
201 is in the bag
81 is in the bag
605 is in the bag

Display Bag after searches
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

number of 66 in bag? 0
number of 57 in bag? 1
number of 201 in bag? 1
number of 81 in bag? 1
number of 605 in bag? 2

Display Bag after counts
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

66 is stated as not in the bag - remove failed -value indeed gone from bag
Display Bag after trying to remove: 66
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

57 stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: 57
201, 605, 302, 923, 71, 605, 81
Size: 7

201 stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: 201
605, 302, 923, 71, 605, 81
Size: 6

81 stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: 81
302, 923, 71, 605, 605
Size: 5

Sample Run of TestLinkedBagString.java

Display Bag on startup

Bag is empty

Display Bag after adds
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Edam is not in the bag
Colby is in the bag
Alpine Lace is in the bag
Swiss is in the bag
Montery Jack is in the bag

Display Bag after searches
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

number of Edam in bag? 0
number of Colby in bag? 1
number of Alpine Lace in bag? 1
number of Swiss in bag? 1
number of Montery Jack in bag? 2

Display Bag after counts
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Edam is stated as not in the bag - remove failed -value indeed gone from bag
Display Bag after trying to remove: Edam
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Colby stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: Colby
Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Swiss
Size: 7

Alpine Lace stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: Alpine Lace
Montery Jack, Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Swiss
Size: 6

Swiss stated as removed from bag -value indeed gone from bag -good
Display Bag after trying to remove: Swiss
Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Montery Jack
Size: 5

Explanation / Answer

RunTestLinkedBagWithString.java


public class RunTestLinkedBagWithString
{
    public static void main(String[] args)
    {
        runMe();
    }
  
    public static void runMe()
    {
        TestLinkedBagGeneric<String> testLinkedBagString = new TestLinkedBagGeneric<String>();

        String[] arrayOfStringsToAdd = {"Swiss", "Colby", "Montery Jack", "Cheddar", "Havarti",
                    "Montery Jack", "Alpine Lace", "Wisconsin Cheddar"};

        // Note: because we are using .equals() to be generic in our code, the down side
        //       is that for Strings case matters - so my searches/removes play nice!

        String[] arrayOfStringsToSearchFor = {"Edam","Colby","Alpine Lace","Swiss","Montery Jack"};

        String[] arrayOfStringsToDelete = {"Edam","Colby","Alpine Lace","Swiss"} ;

        testLinkedBagString.test ( arrayOfStringsToAdd,
                                   arrayOfStringsToSearchFor,
                                   arrayOfStringsToDelete );      
    }

}


TestLinkedBagGeneric.java

public class TestLinkedBagGeneric<E>
{
    public void test(E[] testDataAdd, E[] testDataSearch, E[] testDataRemove)
    {
        // creates a linked bag
        LinkedBag<E> myGenericBag = new LinkedBag<E>( );

        // show initial bag
        displayBag("Display Bag on startup",myGenericBag);

        // add some stuff to the bag
        for (E item : testDataAdd)
            myGenericBag.add(item);

        // show bag after adds
        displayBag(" Display Bag after adds",myGenericBag);

        // look for some stuff
        for (E item : testDataSearch)
            displayValueExists(item,myGenericBag);

        // show bag after searched
        displayBag("Display Bag after searches",myGenericBag);

        // count some stuff
        for (E item : testDataSearch)
            displayCountValue(item,myGenericBag);

        // show bag after counting
        displayBag("Display Bag after counts",myGenericBag);

        // remove some stuff AND display
        for (E item : testDataRemove)
            removeValue(item,myGenericBag);
    }

    /**
        the displayValueExists method displays whether aValue exists in aBag
        @param aValue the E to look for
        @param aBag the LinkedBag<E> to look in
    */
    private void displayValueExists(E aValue, LinkedBag<E> aBag)
    {
        if (aBag.exists(aValue))
            System.out.println(" " + aValue + " is in the bag");
        else
            System.out.println(" " + aValue + " is not in the bag");
    }

    /**
        the displayCountValue method displays the number of aValue that occurs in aBag
        @param aValue the E to look for
        @param aBag the LinkedBag<E> to look in
    */
    private void displayCountValue(E aValue, LinkedBag<E> aBag)
    {
        System.out.println(" number of "+aValue+" in bag? " +
            aBag.countOccurrences(aValue));
    }

    /**
        the removeValue method attempts to remove aValue from aBag
        @param aValue the E to remove
        @param aBag the LinkedBag<E> to look in
    */
    private void removeValue(E aValue, LinkedBag<E> aBag)
    {
        if (aBag.remove(aValue))
        {
            System.out.print(" "+aValue+" stated as removed from bag");
            // double check it is really gone using bags toString() as opposed to exists
            if (aBag.toString().toLowerCase().indexOf(aValue.toString().toLowerCase()) == -1)
                System.out.print(" -value indeed gone from bag -good");
            else
               System.out.print(" -boolean returned was true but value is still in bag <==== issue");
        }
        else
        {
            System.out.print(" "+aValue+" is stated as not in the bag - remove failed");
            // double check it is really gone using bags toString() as opposed to exists
            if (aBag.toString().toLowerCase().indexOf(aValue.toString().toLowerCase()) == -1)
                System.out.print(" -value indeed gone from bag");
            else
               System.out.print(" -boolean returned was false but value is in bag <==== issue");

        }

        displayBag("Display Bag after trying to remove: "+aValue,aBag);
    }


    /**
        the displayBag method displays the linked bag
        @param heading a String to display before the bag
        @param aBag the LinkedBag<E> to display
    */
    private void displayBag(String heading, LinkedBag<E> aBag)
    {
        System.out.println(" " + heading);

        if (aBag.getSize() == 0)
            System.out.println(" Bag is empty");
        else
        {
            System.out.println(aBag);
            System.out.println("Size: " + aBag.getSize());
        }

    }
}

LinkedBag.java
public class LinkedBag<T>
{
    //region FIELDS
    private Node<T> head; //the first node in the list
    private int numElements; //the number of elements in the list
    //endregion

    //region CONSTRUCTORS

    /*
        No-args constructor. Initializes to 0 elements with no head node.
     */
    public LinkedBag()
    {
        head = null;
        numElements = 0;
    }
    //endregion

    //region ACCESSORS

    /*
        Returns the size of the list.
        @returns the size of the list.
    */
    public int getSize()
    {
        return numElements;
    }

    /*
        Checks whether or not the given element exists within the list.
        @params The element to be searched for in the list.
        @returns Whether or not the element exists.
     */
    public boolean exists(T element)
    {
        boolean elementFound = false;

        for (Node<T> cursor = head; cursor != null && !elementFound; cursor = cursor.getLink())
        {
            if (cursor.getData().equals(element))
            {
                elementFound = true;
            }
        }

        return elementFound;
    }

    /*
        Counts the number of times an element is contained within the list.
        @params The element to be searched for.
        @returns The number of times the element has been found within the list.
     */
    public int countOccurrences(T element)
    {
        int occurrences = 0;

        for (Node<T> cursor = head; cursor != null; cursor = cursor.getLink())
        {
            if (cursor.getData().equals(element))
            {
                occurrences++;
            }
        }

        return occurrences;
    }
    //endregion

    //region MUTATORS

    /*
        Add an element to the list.
        @param element The element to be added to the list.
     */
    public void add(T element)
    {
        head = new Node<>(element, head);
        numElements++;
    }

    /*
        Removes the element from the list.
        @param element The element to be removed.
     */
    public boolean remove(T element)
    {
        boolean elementFound = false;

        Node<T> targetNode = head;
        for (Node<T> cursor = head; cursor != null && !elementFound; cursor = cursor.getLink())
        {
            if (cursor.getData().equals(element)) {
                elementFound = true;
                targetNode = cursor;
            }
        }

        if (elementFound)
        {
            targetNode.setData(head.getData());
            head = head.getLink();
            numElements--;
        }

        return elementFound;
    }
    //endregion

    //region OVERRIDES

    /*
        Returns the list as a single string.
        @returns The list as a single String.
     */
    public String toString()
    {
        //first check for a null head, or 0 elements
        if (head == null || numElements == 0)
        {
            return "empty";
        }

        String returnString = "";

        for (Node<T> cursor = head; cursor != null; cursor = cursor.getLink())
        {
            returnString += cursor.getData();

            if (cursor.getLink() == null)
            {
          
                returnString += ".";
            }
            else
            {
                returnString += ", ";
            }
        }

        return returnString;
    }
    //endregion
}

Node.java
public class Node<T>
{
    //region FIELDS
    private T data; //the data stored within the node
    private Node<T> link; //the node associated with this node
    //endregion

    //region CONSTRUCTORS

    /*
        Default constructor. Initializes with a data item and a link.
        @param initialData The initial string this node is initialized with.
        @param initialLink The initial string this node is initialized with.
     */
    public Node(T initialData, Node<T> initialLink)
    {
        data = initialData;
        link = initialLink;
    }
    //endregion

    //region ACCESSORS

    /*
        Returns the data associated with this node.
        @returns The data associated with this node.
     */
    public T getData()
    {
        return data;
    }

    /*
        Returns the link associate with this node.
        @returns The link associated with this node.
     */
    public Node<T> getLink()
    {
        return link;
    }
    //endregion

    //region MUTATORS

    /*
        Changes the data associated with this node.
        @params The new data to be associated with this node.
     */
    public void setData(T newData)
    {
        data = newData;
    }

    /*
        Changes the link associated with this node.
        @params The new data to be associated with this node.
     */
    public void setLink(Node<T> newLink)
    {
        link = newLink;
    }
    //endregion
}


sample output

Display Bag on startup

Bag is empty


Display Bag after adds
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Edam is not in the bag

Colby is in the bag

Alpine Lace is in the bag

Swiss is in the bag

Montery Jack is in the bag

Display Bag after searches
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

number of Edam in bag? 0

number of Colby in bag? 1

number of Alpine Lace in bag? 1

number of Swiss in bag? 1

number of Montery Jack in bag? 2

Display Bag after counts
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Edam is stated as not in the bag - remove failed   -value indeed gone from bag
Display Bag after trying to remove: Edam
Wisconsin Cheddar, Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Colby, Swiss
Size: 8

Colby stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: Colby
Alpine Lace, Montery Jack, Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Swiss
Size: 7

Alpine Lace stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: Alpine Lace
Montery Jack, Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Swiss
Size: 6

Swiss stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: Swiss
Havarti, Cheddar, Montery Jack, Wisconsin Cheddar, Montery Jack
Size: 5

RunTestLinkedBagWithInteger.java

public class RunTestLinkedBagWithInteger
{
    public static void main(String[] args)
    {
        runMe();
    }
  
    public static void runMe()
    {
        TestLinkedBagGeneric<Integer> testLinkedBagInteger = new TestLinkedBagGeneric<Integer>();

        Integer[] arrayOfIntsToAdd = {81, 605, 71, 57, 302, 605, 201, 923};
        Integer[] arrayOfIntsToSearchFor = {66, 57, 201, 81, 605};
        Integer[] arrayOfIntsToDelete = {66, 57, 201, 81} ;

        testLinkedBagInteger.test ( arrayOfIntsToAdd,
                                   arrayOfIntsToSearchFor,
                                   arrayOfIntsToDelete );
    }

}

Sample output

Display Bag on startup

Bag is empty


Display Bag after adds
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

66 is not in the bag

57 is in the bag

201 is in the bag

81 is in the bag

605 is in the bag

Display Bag after searches
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

number of 66 in bag? 0

number of 57 in bag? 1

number of 201 in bag? 1

number of 81 in bag? 1

number of 605 in bag? 2

Display Bag after counts
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

66 is stated as not in the bag - remove failed   -value indeed gone from bag
Display Bag after trying to remove: 66
923, 201, 605, 302, 57, 71, 605, 81
Size: 8

57 stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: 57
201, 605, 302, 923, 71, 605, 81
Size: 7

201 stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: 201
605, 302, 923, 71, 605, 81
Size: 6

81 stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: 81
302, 923, 71, 605, 605
Size: 5

RunTestLinkedBagWithCar.java


public class RunTestLinkedBagWithCar
{
    public static void main(String[] args)
    {
        runMe();
    }
  
    public static void runMe()
    {
        TestLinkedBagGeneric<Car> testLinkedBagCar = new TestLinkedBagGeneric<Car>();

        Car[] arrayOfCarsToAdd = {
                    new Car(2015,"Honda Accord"),
                    new Car(1998,"Camry"),
                    new Car(1994,"Explorer"),
                    new Car(2015,"Zoom Zoom"),
                    new Car(2015,"Acura"),
                    new Car(2007,"Neon"),
                    new Car(1965,"Shelby Mustang GT 350"),
                    new Car(2015,"zOom zoOM")};

        // Note: since the .equals() in Car ignores case for the
        //       make, then case doesn't matter so my wAckY cAr caSe
        Car[] arrayOfCarsToSearchFor = {
                    new Car(1994,"Expedition"),
                    new Car(1994,"expLorer"),
                    new Car(2015,"acura"),
                    new Car(2015,"honda ACcord"),
                    new Car(1965,"Shelby Mustang GT 350"),
                    new Car(2015,"Zoom Zoom")};
        Car[] arrayOfCarsToDelete = {
                    new Car(1994,"Expedition"),
                    new Car(1994,"expLorer"),
                    new Car(2015,"acura"),
                    new Car(2015,"honda ACcord") };

        testLinkedBagCar.test ( arrayOfCarsToAdd,
                                   arrayOfCarsToSearchFor,
                                   arrayOfCarsToDelete );
    }

}

Car.java

public class Car implements Comparable<Car>
{
    private int yearModel;
    private String make;
    private int speed;

   /**
      Constructor`
      @param newYearModel The year of the Car.
      @param newMake The make of the Car.
   */

    public Car(int newYearModel, String newMake)
    {
        yearModel = newYearModel;
        make = newMake;
        speed = 0;
    }

   /**
      The getYearModel method returns a Car
      object's yearModel.
      @return The value in the yearModel field.
   */

    public int getYearModel()
    {
        return yearModel;
    }

   /**
      The getMake method returns a Car
      object's make.
      @return The value in the make field.
   */

    public String getMake()
    {
        return make;
    }

   /**
      The getSpeed method returns a Car
      object's speed.
      @return The value in the speed field.
   */

    public int getSpeed()
    {
        return speed;
    }

   /**
      The accelerate method increases speed.
   */

    public void accelerate()
    {
        // i am ommitting a regulator
        speed += 5;
    }

   /**
      The brake method decreases speed.
   */

    public void brake()
    {
        speed-=5;
        if (speed < 0)
            speed = 0;
    }

   /**
      The equals method compares this Car to another Object .
      @param The object to test for equality.
      @return boolean with result of test for equality.
   */

    public boolean equals(Object obj)
    {
        if (!(obj instanceof Car))
            throw new ClassCastException("A Car object expected.");

        Car otherCar = (Car) obj; // cast the Object to a Car

        if (make.equalsIgnoreCase(otherCar.getMake())
            && yearModel == otherCar.getYearModel())
            return true;
        else
            return false;
    }

   /**
      The compareTo method compares this Car to another Object .
      if this car is before other car, return a value < 0.
      if this car is after other car, return a value > 0.
      if this car is equal to other car, return 0.
      @param The object to test for equality.
      @return int with result of comparison.
   */

    public int compareTo(Car anotherCar)
    throws ClassCastException
    {
        if (!(anotherCar instanceof Car))
            throw new ClassCastException("A Car object expected.");

        if (getYearModel() < anotherCar.getYearModel())
            return -1;
        else if (getYearModel() > anotherCar.getYearModel())
            return 1;
        else
            return make.compareToIgnoreCase(anotherCar.getMake());
    }

   /**
      The toString method returns a Car
      object's yearModel, make, speed as a String.
      @return A String with values in the yearModel, make, speed fields.
   */

    public String toString()
    {
        return "[Car " + yearModel +" "+ make+"]";
    }

}
sample output

Display Bag on startup

Bag is empty


Display Bag after adds
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 Expedition] is not in the bag

[Car 1994 expLorer] is in the bag

[Car 2015 acura] is in the bag

[Car 2015 honda ACcord] is in the bag

[Car 1965 Shelby Mustang GT 350] is in the bag

[Car 2015 Zoom Zoom] is in the bag

Display Bag after searches
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

number of [Car 1994 Expedition] in bag? 0

number of [Car 1994 expLorer] in bag? 1

number of [Car 2015 acura] in bag? 1

number of [Car 2015 honda ACcord] in bag? 1

number of [Car 1965 Shelby Mustang GT 350] in bag? 1

number of [Car 2015 Zoom Zoom] in bag? 2

Display Bag after counts
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 Expedition] is stated as not in the bag - remove failed   -value indeed gone from bag
Display Bag after trying to remove: [Car 1994 Expedition]
[Car 2015 zOom zoOM], [Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 1994 Explorer], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 8

[Car 1994 expLorer] stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: [Car 1994 expLorer]
[Car 1965 Shelby Mustang GT 350], [Car 2007 Neon], [Car 2015 Acura], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 7

[Car 2015 acura] stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: [Car 2015 acura]
[Car 2007 Neon], [Car 1965 Shelby Mustang GT 350], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2015 Honda Accord]
Size: 6

[Car 2015 honda ACcord] stated as removed from bag   -value indeed gone from bag -good
Display Bag after trying to remove: [Car 2015 honda ACcord]
[Car 1965 Shelby Mustang GT 350], [Car 2015 Zoom Zoom], [Car 2015 zOom zoOM], [Car 1998 Camry], [Car 2007 Neon]
Size: 5