Create a circular queue using fixed size array. Each index of your queue should store the execution time of the process. Your task is to provide the implementation of following functions: constructor should receive the array size and create a dynamic array. enqueue (function to insert the element into a queue) dequeue (function to remove the element from the queue) isEmpty (function to check whether the queue is empty or not) isFull (function to check whether the queue is full or not) getLength (function to return the total elements in the queue) getSize (function to return the size of queue) reSize (This function should receive the new size as a parameter and resize the queue as per the new size) getRear (function to return the last elements from the queue) getMin (function to return the index with least execution time) getMax (function to return the index with maximum execution time) getCountofSimilar (function to return the processes with same execution time) show (this function should only display the process id and execution of time processes in the queue). Assume that there is uni-tasking system. Provide a function that calculates the total time required by the processes in the1 queue to complete their execution. Destructor (delete all the elements from the queue) Your program should not accept any negative value.
Create a circular queue using fixed size array. Each index of your queue should store the execution time
of the process. Your task is to provide the implementation of following functions:
constructor should receive the array size and create a dynamic array.
enqueue (function to insert the element into a queue)
dequeue (function to remove the element from the queue)
isEmpty (function to check whether the queue is empty or not)
isFull (function to check whether the queue is full or not)
getLength (function to return the total elements in the queue)
getSize (function to return the size of queue)
reSize (This function should receive the new size as a parameter and resize the queue as per the
new size)
getRear (function to return the last elements from the queue)
getMin (function to return the index with least execution time)
getMax (function to return the index with maximum execution time)
getCountofSimilar (function to return the processes with same execution time)
show (this function should only display the process id and execution of time processes in the
queue).
Assume that there is uni-tasking system. Provide a function that calculates the total time required by the
processes in the1 queue to complete their execution.
Destructor (delete all the elements from the queue)
Your program should not accept any negative value.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps