look at the class defined in queue.h and create thecorresponding implementation in queue.cpp . You may
not change any of the existing declarations but you may add morefunctions as you deem necesarry.
queu.h
———-
#ifndef Q_H
#define Q_H
// include this library to use NULL, otherwise use nullptrinstead
#include <cstddef>
#include <iostream>
/* Struct which will be the building block of our list */
struct node{
int val;
node* next;
};
/* Linked list class definition */
class QUEUE{
public:
QUEUE();
void enq(int);
bool deq();
bool isEmpty();
node* getFront();
void printq();
private:
node* front;
node* back;
};
#endif
Expert Answer
An answer will be send to you shortly. . . . .