Bashkengjitur gjendet nje program C++ ndertuar si detyre. Programi krijon nje klase queue dhe teston operacionet SHTO dhe FSHI.
Tirana Center of Technology
—————driver.cpp—————————-
#include<iostream>
#include<fstream>
#include<string>
#include “Queue1.h”
using namespace std;
void printQue(ostream& fout, QueType<ItemType> q, string queName);
//pre: que has been initilized, fout is open for output
//post: each element of que has been written to datafile
void displayMenu(int& choice);
//pre: none
//post: displays the menu for the user to run operations on several queues
void addElement(QueType<ItemType>& q, string queName);
//pre: none
//post: if queue is not full, a user-entered item is added to queue
// if queue is full a message is displayed
void deleteElement(QueType<ItemType>& q, string queName);
//pre: none
//post: if que is not empty deletes an item from the queue and displayed
// if que is empty a “que is empty” message is displayed
int main()
{
int size;
int choice;
cout<<“Enter the size of the queue2″<<endl;
cin>>size;
QueType<ItemType> que2(size);
QueType<ItemType> que1;