Question: Write an interface for the generic Bag ADT ( called AbstractBag ) and adapt our implementation of Bag to derive from this interface. Use the
Write an interface for the generic Bag ADT called AbstractBag and adapt our
implementation of Bag to derive from this interface.
Use the provided starter code under
programmingproblemsproblembaginterface
In the file abstractbag.hpp define a C interface for our Bag ADT called
"AbstractBag". Take a look at bagsimple.hpp to see the functions that
need to be defined in the interface.
a By definition, an interface should have only pure virtual methods.
b Include comments in Javadoc format for each method
Adapt the Bag declaration and implementation in the files bagsimple.hpp
and bagsimple.tpp to derive from the interface in abstractbag.hpp
Build your code locally as you work and make sure that it passes the test
cases found in bagtests.cpp
Once you have defined the interface and all tests are passing, run the
"submission" target and submit the zip file problembaginterface.zip via
Gradescope
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
