Question: I need help with my python programming assignment. The goal is to implement a stack using 2 queues. Im having trouble implementing a method to

I need help with my python programming assignment. The goal is to implement a stack using 2 queues. Im having trouble implementing a method to change the object into a string. Any help would be appreciated!!
 I need help with my python programming assignment. The goal is
to implement a stack using 2 queues. Im having trouble implementing a

Problem# 1 : You have to design a stack that uses two queues for data storage (instead of, for example, a python list as we've seen in class). Specifically, you need to write a class named Stack_2Queues' that will have the following member methods: push), pop0, size0, and is empty0. Follow standard OOP principles of Python as discussed in the class. In addition to the stack ADT methods mentioned above, also include (i) a method in your class to convert an object of your class to a string representation, such to the printO function, and (ii) a method that allows an instance of this class to be passed to the len() function and shows its size. Save this class in a file named MyStack.py". For the two queues, use the queue class Queue-PlistLR, made available to you with this assignment. You also need to write a python program (save it as MyStack test.py) to demonstrate that your implementation is correct by comparing it against a regular stack (also made available to you with this assignment as the class 'Stack PlistLR). that that object can be passed Hints: For the test program, perform the same operations on the two implementations of a stack and show their contents after each operation. Use a tabular form to display this information

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!