Question: C++ please help implementing a few functions in my ArrayQueue class! I need help with parameterized, copy constructor, operator=, pop, push, and serialize. //ArrayQueue class,

C++

please help implementing a few functions in my ArrayQueue class! I need help with parameterized, copy constructor, operator=, pop, push, and serialize.

//ArrayQueue class, I need help implementing these functions

class ArrayQueue: public DataType{

const ArrayQueue& arrayQueue);

public:

//DEFAULT: creates a new queue with no elements

ArrayQueue();

//PARAMETERIZED: creates a new object that holds a count number of elements initialized to the value, value

ArrayQueue(size_t count, const DataType& value);

//COPY: creates a new object based on the data of ano;ther queue thats getting copied

ArrayQueue(const ArrayQueue& other);

//DESTRUCT: destroys an element of the Queue

~ArrayQueue();

//OPERATOR=: assigns a new value to the calling object which is copy of the rhs object. //returns a reference to the calling object

ArrayQueue& operator= (const ArrayQueue& rhs);

//PUSH: inserts value to the back of the queue

void push(const DataType& value);

//POP: removes from the front of th;e queue //check to see if the queue is empty beforehand

void pop();

//SERIALIZE{ outputs to the os the content of the queue object

void serialize(std::ostream& os);

private:

this is the array that holds the data

DataType m_array[ARRAY_MAX];

//m_array index of front element

size_t m_front;

//m_array index of back element

size_t m_back;

//kno;ws how many elements are in the queue

size_t m_size;

};

I tried to provide enough information to help out with this portion of the project. If you need extra information, here is a link to my DataType header and source files and ArrayQueue Header and Source Files. https://docs.google.com/document/d/1MHtYdAo7Gb2ZondHNb7n3u1ZAxXrr4ujz58VWrgkZkU/edit?usp=sharing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!