Question: C++ please leave comments CSDP250 Fall, 2018 Program 02 due: September 17, 2018 Thi s program is an exercise template functions. Pass in your completed
CSDP250 Fall, 2018 Program 02 due: September 17, 2018 Thi s program is an exercise template functions. Pass in your completed program (.cpp file only) to albertcasavant@ gmail.com with the subject line: 250 Program 02. in using template classes and For this program you either integers, characters, or doubles. A queue is a data structure that accepts new items to be stored at the front of the queue and takes away items previously stored from the back of the queue. Thus, this is a FIFO, first in first out data structure, method of storing items. will implement a queue that can contain You will declare a template class for the queue. The queue will be implemented using an array of size 3. The array will be used as a circular array. This means that, for example, if the current frontIndex of the array is 2, and another item must be added to the queue, then has 3 elements, the index must go from 2 to 0. backIndex works the same way. t frontlndex must be incremented. Since the array This is implemented using the modulus operator The class will have 3 data members: an array of SIZE 3 called q. two indexes for use with the array frontlndex and backIndex The class will have three member functions: e a constructor a function putFront(T i that will put a new item on the front of the queue i is the item to be stored. Type T can be integer, character, or double a function getBack0 that will get a previously stored item from the back of the queue. In the constructor you will initially set frontindex and that the queue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
