Question: please use c++ Aa PO 1 DA. 21 av AaBbce ABCDE AaBbce Act AaBb anced Normal No Spacing dates, fixes, and improvements, choose Check for

please use c++  please use c++ Aa PO 1 DA. 21 av AaBbce ABCDE
AaBbce Act AaBb anced Normal No Spacing dates, fixes, and improvements, choose
Check for Updates. Purpose A review of classes, objects, separate compilation with
makefile, pointers, dynamic memory allocation/deallocation, array, sorting, memory leak, dangling pointers Project
description 1. For the provided Node.h and DB.h, create Node.cpp and DB.cpp..where

Aa PO 1 DA. 21 av AaBbce ABCDE AaBbce Act AaBb anced Normal No Spacing dates, fixes, and improvements, choose Check for Updates. Purpose A review of classes, objects, separate compilation with makefile, pointers, dynamic memory allocation/deallocation, array, sorting, memory leak, dangling pointers Project description 1. For the provided Node.h and DB.h, create Node.cpp and DB.cpp..where the DB class works as a stack 2. Create main.cpp as a client program of the DB class. Specifically, the following requirements must be met 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 3. The output of your program should be exactly the same as the provided one. a #ifndef DB_H #define DB_H #include #include "Node.h" using namespace std; //for ostream class DB private: Node* front; int size; public: DB(); -DB(); void push(int); void pop(); void display(ostream&); }; endif #include struct Node { int data; //current student Node* next; Node(); 1/constructor -> initialize the data members Node(int, Node* = nullptr); //constructor with arg Node(); //destructor }; 1. Outputs Below are the sample otitput. Replace the screenshot below with your own. $ ./a.exe DB() : 0x7b18ce DB:: push(14) Node(int, Node*) : ex7b18de DB:: push(29) Node(int, Node*) : @x7b18ee DB:: push(67) Node(int, Node*) : 0x7b18fe DB:: push(32) Node(int, Node") : @x7b1900 DB:: push(10) Node(int, Node*) : ex761910 ---After pushing 5 integers-- 10 32 67 29 14 DB:: pop (@x7b18ce) Node() : @x7b1910 DB::pop(ex7b18ce) Node() : ex7b1900 -------After popping 2 integers. 67 29 14 DB() : ex7b18ce Node() : @x7b18fe Node() : @x7b18ee Node() : 0x7b18de 3. Block diagram that shows how main() interacts with DB and Node

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!