Question: This is an important assignment for me, can you please do it completely right? In this assignment you have to program a commonly used data

This is an important assignment for me, can you please do it completely right?

In this assignment you have to program a commonly used data structure (matrix, stack, queue, tree, etc..., excluding array/vector/string). First, you have to create an interface class for this data structure. This interface class should have absolutely necessary functionality (push/pop/isempty for stack). Remember it should have no implementation (pure virtual functions only), no data members. You should use integers for data.

In the second part you should implement this interface in a class (inheriting from it). This class should have additional functions that are specific to your implementation. For instance, in stack you should have size, number of elements in it, etc... You may use vector as underlying data type for all these data structures. Your implementation should have necessary constructors that will allow user to set initial data. Do not add any operator overloading as it will be the topic of our next assignment.

Your code should have 2 headers and 2 cpp files. Interface.h should include your interface class, Impl.h should include your class for the implementation, Impl.cpp should contain the code for your class, Example.cpp should contain the example program which should include int main. Your program should compile on a standard C++14 compiler.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!