Grab Bag Grab Bag Simple Data Structure Created Either Array Linked Structure Going Opt Li Q37256334

Grab Bag:

The Grab-Bag is a simple data structure that can be createdeither with an array or a linked structure (We are going to opt forthe linked structure). The GrabBag has two major functions:

 add things to the bag

 remove things RANDOMLY from the bag

Specifications:

Bag (65% specification)

You are to implement a Grab-Bag data structure in C/C++. You maychoose to use either language as your code base.

You will create several structs to accomplish this:

 Card Struct

o Suit

o Value

 BagNode

o Card* card

o BagNode* next

You will maintain any and all necessary pointers to create andmaintain the bag. This should be similar to a linked-list

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.