Answer to Question #153633 in C++ for kazi rimon

Question #153633

We would like to implement the abstract data type called “Bag” that keeps track of bag of

blobs. A bag has a maximum size Msize and supports insert, delete, IsEmpty, IsFull, and

constructor/destructor operations.

Insert adds a new blob to the bag and Delete removes a blob from the bag. Assume blob is a

record type. A bag of blobs can be implemented using an array A[1..Msize] of blob pointers. If

there are k blobs in the bag then the entries A[1], ..., A[k] point to these blobs. The remaining

entries of the array point to null.

The method Insert (p: blob pointer) adds the blob pointed to by p to the bag that is not full and

the method Delete (p: blob pointer) removes the blob pointed to by p from the bag. Each blob in

the bag should have an integer field that indicates where it is in the array A.


1
Expert's answer
2021-01-04T03:35:10-0500
Dear kazi rimon, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
15.01.21, 18:29

Dear bolt, please use panel for submitting new questions

bolt
15.01.21, 18:26

here we need to make an abstract data type in c++. where we have to create a class with some methods called insert delete which will implement some operations like insert some integers in an Array or delete some values from the array. Any expert want to solve the problem?

Leave a comment