Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 2 Test Case Creation Using the following pseudocode, provide 5 unique test cases that would help validate the algorithm in the Pseudo-code below. Be

Homework 2 Test Case Creation Using the following pseudocode, provide 5 unique test cases that would help validate the algorithm in the Pseudo-code below. Be sure to place the test cases in a table showing the input values, the expected TaxRate to be used, and the expected output for each test case. Make sure you test All IF conditions. Main Declare State AS String End Declare Price, TaxRate, SalesTax AS Float // Prompt user for inputs Write "Enter the State Abbrv (2char- upper case)." Input State Write "Enter the price in dollars:" Input Price //Validate Price If (Price < 0) Write *** Invalid Price , Must be positive EndIf IF (State == NY OR State == CA OR State == NJ) TaxRate = .09 ELSEIF (State == MD OR State == DE) TaxRate = .08 Else TaxRate = .05 Endif // Calculate Sales Tax SalesTax = Price *TaxRate // Calculate price with sales tax Set Price = Price + SalesTax // Display State and Price Write "Price with Tax is" + Price Submit your Word or PDF file to your assignments folder no later than the due date.

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

More Books

Students also viewed these Databases questions