![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 04.02.2020 05:51 landofliam30
Examine the following declarations and definitions for the array-based implementations for the stack and queue adts. assume that exception class pushonfullstack and class poponemptystack have been defined and are available. read the following code segment and fill in blank #6.
class stacktype
{
public:
stacktype();
void push(stackitemtype item);
void pop();
private:
int top;
itemtype items[max_stack];
};
void stacktype: : stacktype()
{
top = -1;
}
void stacktype: : push(itemtype item)
{
// 1
; // 2
; // 3
; // 4
}
class quetype
{
public:
// prototypes of quetype operations
// go here
private:
int front;
int rear;
itemtype items[max_queue];
}
void quetype: : quetype()
{
front = max_queue - 1;
rear = max_queue - 1;
}
boolean quetype: : isempty()
{
return (rear == front);
}
void quetype: : enqueue(itemtype item)
{
; // 5
; // 6
}
[1] rear = (rear +1) % max_queue
[2] items[rear] = item
[3] rear = (rear % max_queue) + 1
[4] items[front] = item
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 06:30
Ineed to know the anwser to all these questions
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 02:00
Lisa is making a presentation for her project and she wants to use the logo of her company in her presentation. which element would she use to make her logo stand out in her presentation? a. gradation b. contrast c. alignment d. balance
Answers: 1
You know the right answer?
Examine the following declarations and definitions for the array-based implementations for the stack...
Questions
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/fizika.png)
Physics, 20.09.2020 19:01
![question](/tpl/images/cats/istoriya.png)
History, 20.09.2020 19:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.09.2020 19:01
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.09.2020 19:01
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 20.09.2020 19:01
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
History, 20.09.2020 19:01