Question: NEED IN PYTHON , 3 FILES - - - GOALS: Through the completion of this assignment students should gain hands - on experience with the
NEED IN PYTHON FILES GOALS:
Through the completion of this assignment students should gain handson experience with the queue ADT its purpose and implementation. Students should learn how the fastest queue the linked list queue is designed and understand how this type of data structure combines the functionality of the queue ADT with the speed of linked list storage. Students should also understand that linked list technology can be applied to any data structure, including the stack ADT, to provide fast insertions and removals of objects.
DESCRIPTION:
The PEX class should meet all the requirements listed below. Its purpose is to test all of the files created in the Chapter Seven assignment. Basically, it tests an input string to determine whether the string is a palindrome. A palindrome is a sequence of characters that can be reversed to reveal the same sequence. For example, the word "racecar" is a palindrome; if you reverse the letters in the word "racecar", you end up with the same word: "racecar". The string is also a palindrome, since the string can be reversed to reveal the same order of characters. However, the word, "cat" is not a palindrome, since the reversal of "cat" is "tac".
FILES TO BE SUBMITTED:
In this assignment students should create three Python classes called GenericStack points GenericQueue points and PEX points The PEX class tests all of the other files created in the assignment. After the assignment has been completed, all three files should be submitted for grading into the Dropbox for Assignment Seven, which can be found in the Dropbox menu on the course website. Students should note each py file for each classinterface needs to be submitted.
Students should be familiar with how to instantiate objects and print values to the screen using print Therefore, the actual implementation code for this assignment will not be provided. Students may organize the output of data according to their own specifications. However,
PEXpy must perform the following tasks:
Declare an genericstack, and instantiate it as a GenericStack.
Declare an genericqueue, and instantiate it as a GenericQueue.
Print a prompt to the user to enter a string that will be evaluated.
Read the string and save it
Iterate through each character in the String, placing each character onto the stack as well as onto the queue.
Determine whether the String is a palindrome by comparing each character poppyd off of the stack to each character dequeued from the queue. Since the stack pops characters in the reverse order in which they were added and the queue dequeues characters in the same order in which they were added, the characters from any String would not match; only a perfect palindrome would pass the test.
Print whether the String received was a palindrome.
Print a prompt, asking if the user would like to evaluate another string. If the user chooses to do so repeat steps
HINT:
Steps should be contained within a loop that ends when the user chooses not to evaluate another string. Don't forget to clear the stack and queue before ending each
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
