Question: I have both header files for a queue of nodes. What would the cpp files look like? #ifndef NODE_H #define NODE_H using namespace std; class

I have both header files for a queue of nodes. What would the cpp files look like?

#ifndef NODE_H

#define NODE_H

using namespace std;

class Node {

private:

string m_entry;

Node* m_next;

public:

Node(string entry);

string getEntry() const;

void setEntry(string entry);

Node* getNext() const;

void setNext(Node* next);

}; #endif

#ifndef QUEUE_H

#define QUEUE_H

#include "node.h"

using namespace std;

class Queue {

private:

Node* m_front;

Node* m_back;

public:

Queue();

Queue(const Queue& orig);

~Queue();

void operator=(const Queue& rhs);

bool qIsEmpty() const;

void enqueue(const string entry);

void dequeue();

string peekFront() const;

}; #endif

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!