Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago

Question

Define Management by exception

Answered: 1 week ago

Question

Explain the importance of staffing in business organisations

Answered: 1 week ago