#include #include using namespace std ; #include "Time.h" #include "PrintJob.h" #include "node.h" #include "PrinterQueue.h" // Member Functions // Pre - none // Post - create empty list / queue // Constructor PrinterQueue::PrinterQueue() { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - other queue exists // Post - copy 'other' queue into 'this' queue // Copy Constructor PrinterQueue::PrinterQueue(const PrinterQueue & other) { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - none // Post - delete all nodes still in queue (don't need to delete data cause it's not a pointer) // Destructor PrinterQueue::~PrinterQueue() { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - 'addme' print job is filled // Post - returns true if was able to Enqueue 'addme' print job // we allow duplicates, so this should just always return true bool PrinterQueue::Enqueue(const PrintJob & addme) { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - none // Post - returns true if was able to Dequeue a print job // only time it would return false is if the Printer Queue is empty // also modified the 'printedme' job so it returns a COPY of the job that was printed bool PrinterQueue::Dequeue(PrintJob & printedme) { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - none // Post - returns true if Printer Queue is empty, false if it is not bool PrinterQueue::IsEmpty( ) const { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Pre - none // Post - returns true if it was able to find the next print job // only time it would return false is if the Printer Queue is empty // also modifies the 'nexttoprint' job so it returns a COPY of the job that was printed bool PrinterQueue::NextToPrint(PrintJob & nexttoprint) const { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ } // Friend Functions // Pre - none // Post - prints whats in the Printer Queue, sorted by Priority (highest first) // the Queue should already be sorted, so this just needs to walk through and print the list ostream & operator<<(ostream & out, const PrinterQueue & printme) { /* ********************* */ /* YOU CODE THIS FOR HW3 */ /* ********************* */ return out ; }