Question: please use c++ Project2 Purpose A review of classes, objects, separate compilation with makefile, pointers, dynamic memory allocation/deallocation, array, sorting, memory leak, dangling pointers Project

please use c++  please use c++ Project2 Purpose A review of classes, objects, separate
compilation with makefile, pointers, dynamic memory allocation/deallocation, array, sorting, memory leak, dangling

Project2 Purpose A review of classes, objects, separate compilation with makefile, pointers, dynamic memory allocation/deallocation, array, sorting, memory leak, dangling pointers Project description For the provided Node.h and DB.b, create Node.cpp and DB.cpp, where the DB class works as a stack Nodeh include Initialize the data members Nodel int, Node = nullptr); // constructor with arg Node(): //destructor ); DB.h #ifndef DB_H #define DH #include #include "Node.h" using namespace std; //for ostream class DBC private: Nodeu front; int size; public: DB(); -DB(); void push(int): void pop(); void display ostream&); #endit Create main.cpp as a client program of the DB class. Specifically, the following requirements must be met a. An instance of DB is created in the heap b. The following operations of DB must be explicitly called. Push to insert 5 random two-digit integers into the stack, respectively. Pop to remove 2 integers from the stack in a row The output of your program should be exactly the same as the provided one. $ ./a.exe DB) : 0x7b18ce DB:: push(14) Node(int, Node*) : @x7b18de DB:: push(29) Node(int, Node*) : @x7b18e DB:: push(67) Node(int, Node*) : 0x7b18fe DB:: push(32) Node(int, Node*) : 0x761900 DB:: push(10) Node(int, Node*) : 0x7b1910 --After pushing 5 integers--- 10 32 67 29 14 DB:: pop (@x28ce) Node() : 0x761910 DB::pop (@x7b18ce) -Node() : @x7b1900 ---After popping 2 integers-- 67 29 14 ~DB() : @x7b18co wNode() : 0x7b18fe Node() : @x7b18ee wNode(): 0x7b18de

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!