Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

33. In this question you will demonstrate your skill in writing test scripts. In Chapter 9, we studied the evaluation of post-fix expressions as an

image text in transcribedimage text in transcribedimage text in transcribed

33. In this question you will demonstrate your skill in writing test scripts. In Chapter 9, we studied the evaluation of post-fix expressions as an application of stacks and queues. The evaluation function had the following interface: def postfix_evaluate (expr_string): Purpose: Evaluate a postfix expression. Pre-conditions: expr_list: a string representing a post-fix expression Post-Conditions: none Return: the value of the expression Using the form below, design 3 test cases. You must indicate the inputs, the expected outputs, and the reason for your test. Using the form below, design 3 test cases. You must indicate the inputs, the expected outputs, and the reason for your test. Test case inputs: Expected result: Reason: Test case inputs: Expected result: Reason: Test case inputs: Expected result: Reason: 32. In this question you will demonstrate your understanding of references, and the Node ADT. Consider the following script, which uses the Node ADT: import node as node y = node.create (3, None) t = node.create (1, None) node.set_next (y, t) x = y y = node.get_next (y) t = node.create (4, None) node.set_next (y, t) y = node.get_next (y) In the space below, draw the Global Python frame, and the heap, showing the nodes created and all the variables, and all the references, as it would appear at the end of the script. You may use the simplified diagrams for nodes, as we did in class. You may also find it useful to work through the code above, with a rough diagram, and then draw out the final state more clearly below it. You have enough space here. Draw a box around your final

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

Students also viewed these Databases questions