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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started