Question
Construct a C++ implementation of a static queue class.. Write test program to test every member functions implemented in the class. This is the header
Construct a C++ implementation of a static queue class.. Write test program to test every member functions implemented in the class. This is the header file.
#ifndef _DEQUE_H_ #define _DEQUE_H_
#include
template
// postcondition: dq has been displayed from front to rear template
private: T data[CAPACITY]; // Circular array size_type first; // Index of item at front of the queue size_type last; // Index of item at rear of the queue size_type count; // Total number of items in the queue
// postcondition: returned next index in array size_type next_index(size_type i) const {return (i+1)% CAPACITY; } // postcondition: returned previous index in array size_type prev_index (size_type i) const {return (i+CAPACITY-1)% CAPACITY;} };
#include "deque.template"
#endif
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started