Question: 1. implement a stack and a queue classes. Keep these classes separate. Then either via a main program or another class, implement the code that

1. implement a stack and a queue classes. Keep these classes separate. Then either via a main program or another class, implement the code that will test your classes.

The stack and/or queue abstractions must be implemented using Single linked lists.

2.Write a simple application to manage an adding machine program, where the stack is sued to push and pop numbers and results. Your application should read in integer numbers and push them onto a stack and add them together whenever a plus sign is entered. It should support operations of: addition, subtraction, multiplication, and division. When the = is requested from the user, the result should be displayed. Design for a way for the user to cancel all entries (which will end up clearing the stack).Use your queue to manage the input received from the user. All data must be read a line at a time from standard-in, enqueue this data for future use. Then, retrieve it from the queue – to determine what operations the user has requested 

Step by Step Solution

3.39 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Two C implementations one for a stack and one for a queue both using singly linked lists Then Ill show you how to create a simple adding machine program that uses the stack for calculations and the qu... View full answer

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 Algorithms Questions!