Question: Read the following code. Fill in each blank. struct Node Type; typedef Node Type NodePtr. structNodeType {ItemType info; NodePtr next;} class StackType {public://Prototypes go here

 Read the following code. Fill in each blank. struct Node Type;

Read the following code. Fill in each blank. struct Node Type; typedef Node Type NodePtr. structNodeType {ItemType info; NodePtr next;} class StackType {public://Prototypes go here private: NodePtr stack;}; StackType::StackType()//Pre: none//Post: stock has been created. {_____;} viodStackType::Push(ItemType item)//Pre: stack is not full//Post; item is on the stack {NodePtr itemPtr; itemPtr = _____;//2 _____ = item;//3 _____ = stack;//4 stack = itemPtr;} classQueType {public;//protypes go here private: NodePtr front; NodePtr rear;} BooleanQueType;;IsEmpty ()//Pre: queue has been created//Post;; return true if queue is//empty;false, otherwise. {return _____;} Void Quetype::Deque (ItemType& item)//Pre: queue is not empty//Post; item with the longest time//on the queue is removed. {NodePtr tempPtr, tempPtr = _____;//6 item = _____;//7 front = _____;//8 if(_____)//9 rear = NULL; delete _____;//10} #1 top = -1 new Node Type front front rightarrow next front == NULL

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!