Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

About Stack Short Answer Question: Please provide two example applications of th

ID: 3814708 • Letter: A

Question

About Stack Short Answer Question: Please provide two example applications of the stack data structure by description. For each description, please provide 30 - 50 words. About Queue Short Answer Question: Please provide two example applications of the queue data structure by description. For each description, please provide 30 - 50 words. Programming Question: According to the drill and practice program in class, write a program to let people practice about inputting the correct answers for mathematical expressions in the form of a * b + c. Write a driver program to test the static array based circular queue. Project turn in method: Please upload two files. One is a word document with answers to short answer questions and screen captures of program output. The other is a zip file with .cpp and .h files needed for the programs.

Explanation / Answer

Stack can be classified as linear data structure. In stack, addition of new data item is done from top and deletion of already existing data item is also done from top. Real life examples are stack of plates & stack of books.

Real life examples of queue are: 1. A queue of people standing at ticket-window: The person who comes first gets the opportunity to get ticket first. The person who is coming last shall get the tickets in last. Therefore, there is application of first-in-first-out (FIFO) strategy of queue.
2. Vehicles on toll-tax bridge: The vehicle that reaches first to the toll booth leaves the booth first. The vehicle that comes last leaves last. Therefore, it follows first-in-first-out (FIFO) strategy of queue.