Question: Need help creative a Python or Java implementation for a PDA of the language A. The specifics can be found here: https://web.njit.edu/~marvin/cs341/progs/prog2pda-ae.pdf 4 Program Specifications
Need help creative a Python or Java implementation for a PDA of the language A. The specifics can be found here: https://web.njit.edu/~marvin/cs341/progs/prog2pda-ae.pdf

4 Program Specifications You must write your program in C, C++, Java, or Python. All input/output must be through standard input/output, and your program is to work as follows: 1. Your program asks the user if s/he wants to enter a string. The user then enters "y" for "yes", or "n" for "no" If the user enters "n", then the program terminates. If the user enters "y", then the user is prompted to enter a string over 2. If the user chooses to input a string, your program then reads in the string. You may assume that the user will only enter a string over After reading in the string, your program prints it. Then your program processes the string on your PDA in the following manner. Your program must begin in the start state of the PDA and print out the name of that state (q1 or go). After each transition of the PDA, your program must print out the symbol that was read, the symbol that was popped from the stack, the symbol that was pushed onto the stack, and the name of the current state of the PDA. If the PDA crashes before reaching the end of the input string, your program should output this fact. 3. After completing the processing of the string on the PDA (possibly by crashing), your program must indicate if the string is accepted or rejected based on how the string was processed on the PDA. Your program then must return to step 1. 4 Program Specifications You must write your program in C, C++, Java, or Python. All input/output must be through standard input/output, and your program is to work as follows: 1. Your program asks the user if s/he wants to enter a string. The user then enters "y" for "yes", or "n" for "no" If the user enters "n", then the program terminates. If the user enters "y", then the user is prompted to enter a string over 2. If the user chooses to input a string, your program then reads in the string. You may assume that the user will only enter a string over After reading in the string, your program prints it. Then your program processes the string on your PDA in the following manner. Your program must begin in the start state of the PDA and print out the name of that state (q1 or go). After each transition of the PDA, your program must print out the symbol that was read, the symbol that was popped from the stack, the symbol that was pushed onto the stack, and the name of the current state of the PDA. If the PDA crashes before reaching the end of the input string, your program should output this fact. 3. After completing the processing of the string on the PDA (possibly by crashing), your program must indicate if the string is accepted or rejected based on how the string was processed on the PDA. Your program then must return to step 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
